summaryrefslogtreecommitdiffstats
path: root/js/src/jsscript.h
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-19 14:48:24 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-19 14:48:24 +0100
commit75db97cb3772fc0693947ec17c5954a04cb234a8 (patch)
treedc1035d6da831d7cedda70f770f1f17a2272ed37 /js/src/jsscript.h
parentfaa5f0df26e09d1f2e633618476294d112c24322 (diff)
downloadUXP-75db97cb3772fc0693947ec17c5954a04cb234a8.tar
UXP-75db97cb3772fc0693947ec17c5954a04cb234a8.tar.gz
UXP-75db97cb3772fc0693947ec17c5954a04cb234a8.tar.lz
UXP-75db97cb3772fc0693947ec17c5954a04cb234a8.tar.xz
UXP-75db97cb3772fc0693947ec17c5954a04cb234a8.zip
Bug 1320388: Move JSFunction::HAS_REST to JSScript and LazyScript
Issue #78 [Depends on] Bug 883377: Implement ES6 function "name" property semantics
Diffstat (limited to 'js/src/jsscript.h')
-rw-r--r--js/src/jsscript.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/jsscript.h b/js/src/jsscript.h
index ffd4b1e2e..690bc225d 100644
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -1012,6 +1012,8 @@ class JSScript : public js::gc::TenuredCell
bool isAsync_:1;
+ bool hasRest_:1;
+
// Add padding so JSScript is gc::Cell aligned. Make padding protected
// instead of private to suppress -Wunused-private-field compiler warnings.
protected:
@@ -1308,6 +1310,13 @@ class JSScript : public js::gc::TenuredCell
isAsync_ = kind == js::AsyncFunction;
}
+ bool hasRest() const {
+ return hasRest_;
+ }
+ void setHasRest() {
+ hasRest_ = true;
+ }
+
void setNeedsHomeObject() {
needsHomeObject_ = true;
}
@@ -1940,6 +1949,7 @@ class LazyScript : public gc::TenuredCell
uint32_t treatAsRunOnce : 1;
uint32_t isDerivedClassConstructor : 1;
uint32_t needsHomeObject : 1;
+ uint32_t hasRest : 1;
};
union {
@@ -2068,6 +2078,13 @@ class LazyScript : public gc::TenuredCell
p_.isAsync = kind == AsyncFunction;
}
+ bool hasRest() const {
+ return p_.hasRest;
+ }
+ void setHasRest() {
+ p_.hasRest = true;
+ }
+
bool strict() const {
return p_.strict;
}