mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 720316 - Remove the entirely-unused JOF_SLOTATOM. r=luke
--HG-- extra : rebase_source : 2f2222eebe863873d7d85323e9dd5c5484c72193
This commit is contained in:
parent
d66f282a1c
commit
a25d5c7e3b
@ -334,11 +334,7 @@ frontend::CompileScript(JSContext *cx, JSObject *scopeChain, StackFrame *callerF
|
||||
len = (cs->length > 0)
|
||||
? (uintN) cs->length
|
||||
: js_GetVariableBytecodeLength(code);
|
||||
if ((cs->format & JOF_SHARPSLOT) ||
|
||||
JOF_TYPE(cs->format) == JOF_LOCAL ||
|
||||
(JOF_TYPE(cs->format) == JOF_SLOTATOM)) {
|
||||
JS_ASSERT_IF(!(cs->format & JOF_SHARPSLOT),
|
||||
JOF_TYPE(cs->format) != JOF_SLOTATOM);
|
||||
if ((cs->format & JOF_SHARPSLOT) || JOF_TYPE(cs->format) == JOF_LOCAL) {
|
||||
slot = GET_SLOTNO(code);
|
||||
if (!(cs->format & JOF_SHARPSLOT))
|
||||
slot += bce.sharpSlots();
|
||||
|
@ -1032,8 +1032,7 @@ EmitSlotIndexOp(JSContext *cx, JSOp op, uintN slot, uintN index, BytecodeEmitter
|
||||
ptrdiff_t off;
|
||||
jsbytecode *pc;
|
||||
|
||||
JS_ASSERT(JOF_OPTYPE(op) == JOF_SLOTATOM ||
|
||||
JOF_OPTYPE(op) == JOF_SLOTOBJECT);
|
||||
JS_ASSERT(JOF_OPTYPE(op) == JOF_SLOTOBJECT);
|
||||
bigSuffix = EmitBigIndexPrefix(cx, bce, index);
|
||||
if (bigSuffix == JSOP_FALSE)
|
||||
return JS_FALSE;
|
||||
|
@ -657,18 +657,10 @@ js_Disassemble1(JSContext *cx, JSScript *script, jsbytecode *pc,
|
||||
Sprint(sp, " %u", GET_SLOTNO(pc));
|
||||
break;
|
||||
|
||||
case JOF_SLOTATOM:
|
||||
case JOF_SLOTOBJECT: {
|
||||
Sprint(sp, " %u", GET_SLOTNO(pc));
|
||||
uintN index = js_GetIndexFromBytecode(script, pc, SLOTNO_LEN);
|
||||
jsval v;
|
||||
if (type == JOF_SLOTATOM) {
|
||||
JSAtom *atom = script->getAtom(index);
|
||||
v = STRING_TO_JSVAL(atom);
|
||||
} else {
|
||||
v = OBJECT_TO_JSVAL(script->getObject(index));
|
||||
}
|
||||
|
||||
jsval v = OBJECT_TO_JSVAL(script->getObject(index));
|
||||
JSAutoByteString bytes;
|
||||
if (!ToDisassemblySource(cx, v, &bytes))
|
||||
return 0;
|
||||
|
@ -82,7 +82,7 @@ typedef enum JSOp {
|
||||
#define JOF_LOOKUPSWITCH 5 /* lookup switch */
|
||||
#define JOF_QARG 6 /* quickened get/set function argument ops */
|
||||
#define JOF_LOCAL 7 /* var or block-local variable */
|
||||
#define JOF_SLOTATOM 8 /* uint16_t slot + constant index */
|
||||
/* 8 is unused */
|
||||
#define JOF_UINT24 12 /* extended unsigned 24-bit literal (index) */
|
||||
#define JOF_UINT8 13 /* uint8_t immediate, e.g. top 8 bits of 24-bit
|
||||
atom index */
|
||||
|
@ -54,9 +54,8 @@ GetNameFromBytecode(JSContext *cx, jsbytecode *pc, JSOp op, const JSCodeSpec &cs
|
||||
return cx->runtime->atomState.classPrototypeAtom;
|
||||
|
||||
JSScript *script = cx->stack.currentScript();
|
||||
ptrdiff_t pcoff = (JOF_TYPE(cs.format) == JOF_SLOTATOM) ? SLOTNO_LEN : 0;
|
||||
PropertyName *name;
|
||||
GET_NAME_FROM_BYTECODE(script, pc, pcoff, name);
|
||||
GET_NAME_FROM_BYTECODE(script, pc, 0, name);
|
||||
return name;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user