зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 5428fa083db3 (bug 844805) for perf regressions (bug 887266). no_r=regression.
This commit is contained in:
Родитель
cd5ae7c064
Коммит
6eb5f7714c
|
@ -1895,6 +1895,7 @@ EmitPropLHS(JSContext *cx, ParseNode *pn, JSOp op, BytecodeEmitter *bce)
|
|||
|
||||
do {
|
||||
/* Walk back up the list, emitting annotated name ops. */
|
||||
JS_ASSERT(pndot->getOp() == JSOP_GETPROP);
|
||||
if (!EmitAtomOp(cx, pndot, JSOP_GETPROP, bce))
|
||||
return false;
|
||||
|
||||
|
@ -3436,6 +3437,7 @@ EmitAssignment(JSContext *cx, BytecodeEmitter *bce, ParseNode *lhs, JSOp op, Par
|
|||
}
|
||||
break;
|
||||
case PNK_DOT:
|
||||
JS_ASSERT(lhs->getOp() == JSOP_SETPROP);
|
||||
if (!EmitIndexOp(cx, JSOP_SETPROP, atomIndex, bce))
|
||||
return false;
|
||||
break;
|
||||
|
@ -5031,10 +5033,12 @@ EmitCallOrNew(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn)
|
|||
return false;
|
||||
break;
|
||||
case PNK_DOT:
|
||||
JS_ASSERT(pn2->getOp() == JSOP_GETPROP);
|
||||
if (!EmitPropOp(cx, pn2, callop ? JSOP_CALLPROP : JSOP_GETPROP, bce))
|
||||
return false;
|
||||
break;
|
||||
case PNK_ELEM:
|
||||
JS_ASSERT(pn2->isOp(JSOP_GETELEM));
|
||||
if (!EmitElemOp(cx, pn2, callop ? JSOP_CALLELEM : JSOP_GETELEM, bce))
|
||||
return false;
|
||||
break;
|
||||
|
@ -5916,10 +5920,23 @@ frontend::EmitTree(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn)
|
|||
break;
|
||||
|
||||
case PNK_DOT:
|
||||
/*
|
||||
* Pop a stack operand, convert it to object, get a property named by
|
||||
* this bytecode's immediate-indexed atom operand, and push its value
|
||||
* (not a reference to it).
|
||||
*/
|
||||
JS_ASSERT(pn->getOp() == JSOP_GETPROP);
|
||||
ok = EmitPropOp(cx, pn, JSOP_GETPROP, bce);
|
||||
break;
|
||||
|
||||
case PNK_ELEM:
|
||||
/*
|
||||
* Pop two operands, convert the left one to object and the right one
|
||||
* to property name (atom or tagged int), get the named property, and
|
||||
* push its value. Set the "obj" register to the result of ToObject
|
||||
* on the left operand.
|
||||
*/
|
||||
JS_ASSERT(pn->getOp() == JSOP_GETELEM);
|
||||
ok = EmitElemOp(cx, pn, JSOP_GETELEM, bce);
|
||||
break;
|
||||
|
||||
|
|
|
@ -1165,7 +1165,7 @@ class PropertyAccess : public ParseNode
|
|||
{
|
||||
public:
|
||||
PropertyAccess(ParseNode *lhs, PropertyName *name, uint32_t begin, uint32_t end)
|
||||
: ParseNode(PNK_DOT, JSOP_NOP, PN_NAME, TokenPos(begin, end))
|
||||
: ParseNode(PNK_DOT, JSOP_GETPROP, PN_NAME, TokenPos(begin, end))
|
||||
{
|
||||
JS_ASSERT(lhs != NULL);
|
||||
JS_ASSERT(name != NULL);
|
||||
|
@ -1192,7 +1192,7 @@ class PropertyByValue : public ParseNode
|
|||
{
|
||||
public:
|
||||
PropertyByValue(ParseNode *lhs, ParseNode *propExpr, uint32_t begin, uint32_t end)
|
||||
: ParseNode(PNK_ELEM, JSOP_NOP, PN_BINARY, TokenPos(begin, end))
|
||||
: ParseNode(PNK_ELEM, JSOP_GETELEM, PN_BINARY, TokenPos(begin, end))
|
||||
{
|
||||
pn_u.binary.left = lhs;
|
||||
pn_u.binary.right = propExpr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче