summaryrefslogtreecommitdiffstats
path: root/js/src/jsscript.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/jsscript.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/jsscript.h')
-rw-r--r--js/src/jsscript.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/js/src/jsscript.h b/js/src/jsscript.h
index bb8635581..c3298a884 100644
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -1021,6 +1021,7 @@ class JSScript : public js::gc::TenuredCell
bool isAsync_:1;
bool hasRest_:1;
+ bool isExprBody_:1;
// Add padding so JSScript is gc::Cell aligned. Make padding protected
// instead of private to suppress -Wunused-private-field compiler warnings.
@@ -1329,6 +1330,13 @@ class JSScript : public js::gc::TenuredCell
hasRest_ = true;
}
+ bool isExprBody() const {
+ return isExprBody_;
+ }
+ void setIsExprBody() {
+ isExprBody_ = true;
+ }
+
void setNeedsHomeObject() {
needsHomeObject_ = true;
}
@@ -1936,7 +1944,7 @@ class LazyScript : public gc::TenuredCell
#endif
private:
- static const uint32_t NumClosedOverBindingsBits = 21;
+ static const uint32_t NumClosedOverBindingsBits = 20;
static const uint32_t NumInnerFunctionsBits = 20;
struct PackedView {
@@ -1946,7 +1954,12 @@ class LazyScript : public gc::TenuredCell
uint32_t shouldDeclareArguments : 1;
uint32_t hasThisBinding : 1;
uint32_t isAsync : 1;
+ uint32_t isExprBody : 1;
+
uint32_t numClosedOverBindings : NumClosedOverBindingsBits;
+
+ // -- 32bit boundary --
+
uint32_t numInnerFunctions : NumInnerFunctionsBits;
uint32_t generatorKindBits : 2;
@@ -2104,6 +2117,13 @@ class LazyScript : public gc::TenuredCell
p_.hasRest = true;
}
+ bool isExprBody() const {
+ return p_.isExprBody;
+ }
+ void setIsExprBody() {
+ p_.isExprBody = true;
+ }
+
bool strict() const {
return p_.strict;
}