summaryrefslogtreecommitdiffstats
path: root/js/src/jsfun.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/jsfun.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/jsfun.h')
-rw-r--r--js/src/jsfun.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/js/src/jsfun.h b/js/src/jsfun.h
index 88af5c22d..65da5e06f 100644
--- a/js/src/jsfun.h
+++ b/js/src/jsfun.h
@@ -61,7 +61,6 @@ class JSFunction : public js::NativeObject
function-statement) */
SELF_HOSTED = 0x0080, /* function is self-hosted builtin and must not be
decompilable nor constructible. */
- HAS_REST = 0x0100, /* function has a rest (...) parameter */
INTERPRETED_LAZY = 0x0200, /* function is interpreted but doesn't have a script yet */
RESOLVED_LENGTH = 0x0400, /* f.length has been resolved (see fun_resolve). */
RESOLVED_NAME = 0x0800, /* f.name has been resolved (see fun_resolve). */
@@ -95,7 +94,7 @@ class JSFunction : public js::NativeObject
NO_XDR_FLAGS = RESOLVED_LENGTH | RESOLVED_NAME,
STABLE_ACROSS_CLONES = CONSTRUCTOR | EXPR_BODY | HAS_GUESSED_ATOM | LAMBDA |
- SELF_HOSTED | HAS_REST | FUNCTION_KIND_MASK
+ SELF_HOSTED | FUNCTION_KIND_MASK
};
static_assert((INTERPRETED | INTERPRETED_LAZY) == js::JS_FUNCTION_INTERPRETED_BITS,
@@ -183,7 +182,6 @@ class JSFunction : public js::NativeObject
bool hasGuessedAtom() const { return flags() & HAS_GUESSED_ATOM; }
bool isLambda() const { return flags() & LAMBDA; }
bool isBoundFunction() const { return flags() & BOUND_FUN; }
- bool hasRest() const { return flags() & HAS_REST; }
bool isInterpretedLazy() const { return flags() & INTERPRETED_LAZY; }
bool hasScript() const { return flags() & INTERPRETED; }
@@ -264,11 +262,6 @@ class JSFunction : public js::NativeObject
this->nargs_ = nargs;
}
- // Can be called multiple times by the parser.
- void setHasRest() {
- flags_ |= HAS_REST;
- }
-
void setIsBoundFunction() {
MOZ_ASSERT(!isBoundFunction());
flags_ |= BOUND_FUN;