Bug 1865597 - Add error checking when initializing parallel marking and disable on...
[gecko.git] / js / src / frontend / ValueUsage.h
blob562272c5f8a01ccc98d73c59de25eb775fadd952
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: set ts=8 sts=2 et sw=2 tw=80:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef frontend_ValueUsage_h
8 #define frontend_ValueUsage_h
10 namespace js {
11 namespace frontend {
13 // Used to control whether the expression result is used. This enables various
14 // optimizations, for example it allows to emit JSOp::CallIgnoresRv for function
15 // calls.
16 enum class ValueUsage {
17 // Assume the value of the current expression may be used. This is always
18 // correct but prohibits optimizations like JSOp::CallIgnoresRv.
19 WantValue,
21 // Pass this when emitting an expression if the expression's value is
22 // definitely unused by later instructions. You must make sure the next
23 // instruction is JSOp::Pop, a jump to a JSOp::Pop, or something similar.
24 IgnoreValue
27 } /* namespace frontend */
28 } /* namespace js */
30 #endif /* frontend_ValueUsage_h */