summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/SharedContext.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-08 15:12:00 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:15 -0400
commit90d999c59a08bfc3145317aa4f0a92db0597632e (patch)
treef13ff8d145308b0f5581732e55dc331ad2551901 /js/src/frontend/SharedContext.h
parent986ae6266566447f22be68caf6371cbf98cafd52 (diff)
downloadUXP-90d999c59a08bfc3145317aa4f0a92db0597632e.tar
UXP-90d999c59a08bfc3145317aa4f0a92db0597632e.tar.gz
UXP-90d999c59a08bfc3145317aa4f0a92db0597632e.tar.lz
UXP-90d999c59a08bfc3145317aa4f0a92db0597632e.tar.xz
UXP-90d999c59a08bfc3145317aa4f0a92db0597632e.zip
1320403 - Move JSFunction::EXPR_BODY to JSScript, LazyScript, and FunctionBox.
Diffstat (limited to 'js/src/frontend/SharedContext.h')
-rw-r--r--js/src/frontend/SharedContext.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/frontend/SharedContext.h b/js/src/frontend/SharedContext.h
index b20417d5d..f5a74e18c 100644
--- a/js/src/frontend/SharedContext.h
+++ b/js/src/frontend/SharedContext.h
@@ -473,6 +473,9 @@ class FunctionBox : public ObjectBox, public SharedContext
bool usesThis:1; /* contains 'this' */
bool usesReturn:1; /* contains a 'return' statement */
bool hasRest_:1; /* has rest parameter */
+ bool isExprBody_:1; /* arrow function with expression
+ * body or expression closure:
+ * function(x) x*x */
FunctionContextFlags funCxFlags;
@@ -546,6 +549,11 @@ class FunctionBox : public ObjectBox, public SharedContext
hasRest_ = true;
}
+ bool isExprBody() const { return isExprBody_; }
+ void setIsExprBody() {
+ isExprBody_ = true;
+ }
+
void setGeneratorKind(GeneratorKind kind) {
// A generator kind can be set at initialization, or when "yield" is
// first seen. In both cases the transition can only happen from