diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-16 23:13:47 +0000 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-18 10:30:04 +0000 |
commit | 772cd4b188fd9f30521d4983f60363f4a830e2aa (patch) | |
tree | 7f02fd3c1f881ad1c9abad511a5ed842deac0088 /js/src/frontend/BytecodeEmitter.cpp | |
parent | 625366321008cc464f4295db80c48dd5a19f3ee4 (diff) | |
download | UXP-772cd4b188fd9f30521d4983f60363f4a830e2aa.tar UXP-772cd4b188fd9f30521d4983f60363f4a830e2aa.tar.gz UXP-772cd4b188fd9f30521d4983f60363f4a830e2aa.tar.lz UXP-772cd4b188fd9f30521d4983f60363f4a830e2aa.tar.xz UXP-772cd4b188fd9f30521d4983f60363f4a830e2aa.zip |
Remove JSOP_SPREADCALLARRAY and just use JSOP_NEWARRAY again.
Diffstat (limited to 'js/src/frontend/BytecodeEmitter.cpp')
-rw-r--r-- | js/src/frontend/BytecodeEmitter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index ea6baeec7..7f9fa8a5d 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -9192,7 +9192,7 @@ BytecodeEmitter::emitCallOrNew(ParseNode* pn) return false; } - if (!emitArray(args, argc, JSOP_SPREADCALLARRAY)) + if (!emitArray(args, argc)) return false; if (optCodeEmitted) { @@ -9683,11 +9683,11 @@ BytecodeEmitter::emitArrayLiteral(ParseNode* pn) } } - return emitArray(pn->pn_head, pn->pn_count, JSOP_NEWARRAY); + return emitArray(pn->pn_head, pn->pn_count); } bool -BytecodeEmitter::emitArray(ParseNode* pn, uint32_t count, JSOp op) +BytecodeEmitter::emitArray(ParseNode* pn, uint32_t count) { /* @@ -9698,7 +9698,6 @@ BytecodeEmitter::emitArray(ParseNode* pn, uint32_t count, JSOp op) * to avoid dup'ing and popping the array as each element is added, as * JSOP_SETELEM/JSOP_SETPROP would do. */ - MOZ_ASSERT(op == JSOP_NEWARRAY || op == JSOP_SPREADCALLARRAY); uint32_t nspread = 0; for (ParseNode* elt = pn; elt; elt = elt->pn_next) { @@ -9719,7 +9718,7 @@ BytecodeEmitter::emitArray(ParseNode* pn, uint32_t count, JSOp op) // For arrays with spread, this is a very pessimistic allocation, the // minimum possible final size. - if (!emitUint32Operand(op, count - nspread)) // ARRAY + if (!emitUint32Operand(JSOP_NEWARRAY, count - nspread)) // ARRAY return false; ParseNode* pn2 = pn; |