mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Bug 1320388: Move JSFunction::HAS_REST to JSScript and LazyScript
Issue #78 [Depends on] Bug 883377: Implement ES6 function "name" property semantics
This commit is contained in:
parent
d3ffa46e36
commit
e7ee7caf1e
16 changed files with 52 additions and 37 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue