mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-26 02:02:33 +00:00
Bug 953284 - Remove JSOP_NOTEARG. r=jandem
This commit is contained in:
parent
5917b9967f
commit
6fc725e2e5
@ -2064,8 +2064,6 @@ EmitNameOp(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn, bool callC
|
||||
if (Emit1(cx, bce, JSOP_UNDEFINED) < 0)
|
||||
return false;
|
||||
}
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -2136,9 +2134,6 @@ EmitPropOp(ExclusiveContext *cx, ParseNode *pn, JSOp op, BytecodeEmitter *bce)
|
||||
if (op == JSOP_CALLPROP && Emit1(cx, bce, JSOP_SWAP) < 0)
|
||||
return false;
|
||||
|
||||
if (op == JSOP_CALLPROP && Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2248,8 +2243,6 @@ EmitElemOpBase(ExclusiveContext *cx, BytecodeEmitter *bce, JSOp op)
|
||||
if (op == JSOP_CALLELEM) {
|
||||
if (Emit1(cx, bce, JSOP_SWAP) < 0)
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -4357,8 +4350,6 @@ EmitForOf(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn, ptrdiff_t t
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_SWAP) < 0) // @@ITERATOR OBJ
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
if (EmitCall(cx, bce, JSOP_CALL, 0) < 0) // ITER
|
||||
return false;
|
||||
CheckTypeSet(cx, bce, JSOP_CALL);
|
||||
@ -4434,12 +4425,8 @@ EmitForOf(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn, ptrdiff_t t
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_SWAP) < 0) // ITER NEXT ITER
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_UNDEFINED) < 0) // ITER NEXT ITER UNDEFINED
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
if (EmitCall(cx, bce, JSOP_CALL, 1) < 0) // ITER RESULT
|
||||
return false;
|
||||
CheckTypeSet(cx, bce, JSOP_CALL);
|
||||
@ -5164,8 +5151,6 @@ EmitYieldStar(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *iter)
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_SWAP) < 0) // @@ITERATOR ITERABLE
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
if (EmitCall(cx, bce, JSOP_CALL, 0) < 0) // ITER
|
||||
return false;
|
||||
CheckTypeSet(cx, bce, JSOP_CALL);
|
||||
@ -5236,12 +5221,8 @@ EmitYieldStar(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *iter)
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_SWAP) < 0) // EXCEPTION ITER THROW ITER
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0) // EXCEPTION ITER THROW ITER
|
||||
return false;
|
||||
if (Emit2(cx, bce, JSOP_PICK, (jsbytecode)3) < 0) // ITER THROW ITER EXCEPTION
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0) // ITER THROW ITER EXCEPTION
|
||||
return false;
|
||||
if (EmitCall(cx, bce, JSOP_CALL, 1) < 0) // ITER RESULT
|
||||
return false;
|
||||
CheckTypeSet(cx, bce, JSOP_CALL);
|
||||
@ -5277,12 +5258,8 @@ EmitYieldStar(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *iter)
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_SWAP) < 0) // RECEIVED ITER NEXT ITER
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0) // RECEIVED ITER NEXT ITER
|
||||
return false;
|
||||
if (Emit2(cx, bce, JSOP_PICK, (jsbytecode)3) < 0) // ITER NEXT ITER RECEIVED
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0) // ITER NEXT ITER RECEIVED
|
||||
return false;
|
||||
if (EmitCall(cx, bce, JSOP_CALL, 1) < 0) // ITER RESULT
|
||||
return false;
|
||||
CheckTypeSet(cx, bce, JSOP_CALL);
|
||||
@ -5528,15 +5505,11 @@ EmitCallOrNew(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn)
|
||||
ParseNode *thisArg = funNode->pn_next;
|
||||
if (!EmitTree(cx, bce, thisArg))
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
bool oldEmittingForInit = bce->emittingForInit;
|
||||
bce->emittingForInit = false;
|
||||
for (ParseNode *argpn = thisArg->pn_next; argpn; argpn = argpn->pn_next) {
|
||||
if (!EmitTree(cx, bce, argpn))
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
}
|
||||
bce->emittingForInit = oldEmittingForInit;
|
||||
argc -= 2;
|
||||
@ -5587,8 +5560,6 @@ EmitCallOrNew(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn)
|
||||
JSOp thisop = pn->isKind(PNK_GENEXP) ? JSOP_THIS : JSOP_UNDEFINED;
|
||||
if (Emit1(cx, bce, thisop) < 0)
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (emitArgs) {
|
||||
@ -5603,8 +5574,6 @@ EmitCallOrNew(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn)
|
||||
for (ParseNode *pn3 = pn2->pn_next; pn3; pn3 = pn3->pn_next) {
|
||||
if (!EmitTree(cx, bce, pn3))
|
||||
return false;
|
||||
if (Emit1(cx, bce, JSOP_NOTEARG) < 0)
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!EmitArray(cx, bce, pn2->pn_next, argc))
|
||||
|
@ -839,12 +839,6 @@ BaselineCompiler::emit_JSOP_LABEL()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BaselineCompiler::emit_JSOP_NOTEARG()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BaselineCompiler::emit_JSOP_POP()
|
||||
{
|
||||
|
@ -24,7 +24,6 @@ namespace jit {
|
||||
#define OPCODE_LIST(_) \
|
||||
_(JSOP_NOP) \
|
||||
_(JSOP_LABEL) \
|
||||
_(JSOP_NOTEARG) \
|
||||
_(JSOP_POP) \
|
||||
_(JSOP_POPN) \
|
||||
_(JSOP_POPNV) \
|
||||
|
@ -1512,9 +1512,6 @@ IonBuilder::inspectOpcode(JSOp op)
|
||||
case JSOP_REST:
|
||||
return jsop_rest();
|
||||
|
||||
case JSOP_NOTEARG:
|
||||
return jsop_notearg();
|
||||
|
||||
case JSOP_GETARG:
|
||||
case JSOP_CALLARG:
|
||||
if (info().argsObjAliasesFormals()) {
|
||||
@ -3813,13 +3810,6 @@ IonBuilder::jsop_neg()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
IonBuilder::jsop_notearg()
|
||||
{
|
||||
// :TODO: Remove JSOP_NOTEARG (bug 953284).
|
||||
return true;
|
||||
}
|
||||
|
||||
class AutoAccumulateReturns
|
||||
{
|
||||
MIRGraph &graph_;
|
||||
|
@ -493,14 +493,12 @@ OPDEF(JSOP_IMPLICITTHIS, 226, "implicitthis", "", 5, 0, 1, JOF_ATOM)
|
||||
*/
|
||||
OPDEF(JSOP_LOOPENTRY, 227, "loopentry", NULL, 2, 0, 0, JOF_UINT8)
|
||||
|
||||
/* Notes the point at which a value is pushed as an argument. */
|
||||
OPDEF(JSOP_NOTEARG, 228, "notearg", NULL, 1, 0, 0, JOF_BYTE)
|
||||
|
||||
/*
|
||||
* Pad out the unused opcode space to the nearest power-of-two boundary. The
|
||||
* interpreter uses this to construct a table which is a power-of-two size.
|
||||
*/
|
||||
#ifdef OPPAD
|
||||
OPPAD(228)
|
||||
OPPAD(229)
|
||||
OPPAD(230)
|
||||
OPPAD(231)
|
||||
|
@ -1710,9 +1710,6 @@ CASE(JSOP_LOOPENTRY)
|
||||
|
||||
END_CASE(JSOP_LOOPENTRY)
|
||||
|
||||
CASE(JSOP_NOTEARG)
|
||||
END_CASE(JSOP_NOTEARG)
|
||||
|
||||
CASE(JSOP_LINENO)
|
||||
END_CASE(JSOP_LINENO)
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace js {
|
||||
* and saved versions. If deserialization fails, the data should be
|
||||
* invalidated if possible.
|
||||
*/
|
||||
static const uint32_t XDR_BYTECODE_VERSION = uint32_t(0xb973c0de - 159);
|
||||
static const uint32_t XDR_BYTECODE_VERSION = uint32_t(0xb973c0de - 160);
|
||||
|
||||
class XDRBuffer {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user