зеркало из 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 {
|
do {
|
||||||
/* Walk back up the list, emitting annotated name ops. */
|
/* Walk back up the list, emitting annotated name ops. */
|
||||||
|
JS_ASSERT(pndot->getOp() == JSOP_GETPROP);
|
||||||
if (!EmitAtomOp(cx, pndot, JSOP_GETPROP, bce))
|
if (!EmitAtomOp(cx, pndot, JSOP_GETPROP, bce))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -3436,6 +3437,7 @@ EmitAssignment(JSContext *cx, BytecodeEmitter *bce, ParseNode *lhs, JSOp op, Par
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PNK_DOT:
|
case PNK_DOT:
|
||||||
|
JS_ASSERT(lhs->getOp() == JSOP_SETPROP);
|
||||||
if (!EmitIndexOp(cx, JSOP_SETPROP, atomIndex, bce))
|
if (!EmitIndexOp(cx, JSOP_SETPROP, atomIndex, bce))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
@ -5031,10 +5033,12 @@ EmitCallOrNew(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn)
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case PNK_DOT:
|
case PNK_DOT:
|
||||||
|
JS_ASSERT(pn2->getOp() == JSOP_GETPROP);
|
||||||
if (!EmitPropOp(cx, pn2, callop ? JSOP_CALLPROP : JSOP_GETPROP, bce))
|
if (!EmitPropOp(cx, pn2, callop ? JSOP_CALLPROP : JSOP_GETPROP, bce))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case PNK_ELEM:
|
case PNK_ELEM:
|
||||||
|
JS_ASSERT(pn2->isOp(JSOP_GETELEM));
|
||||||
if (!EmitElemOp(cx, pn2, callop ? JSOP_CALLELEM : JSOP_GETELEM, bce))
|
if (!EmitElemOp(cx, pn2, callop ? JSOP_CALLELEM : JSOP_GETELEM, bce))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
@ -5916,10 +5920,23 @@ frontend::EmitTree(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PNK_DOT:
|
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);
|
ok = EmitPropOp(cx, pn, JSOP_GETPROP, bce);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PNK_ELEM:
|
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);
|
ok = EmitElemOp(cx, pn, JSOP_GETELEM, bce);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1165,7 +1165,7 @@ class PropertyAccess : public ParseNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PropertyAccess(ParseNode *lhs, PropertyName *name, uint32_t begin, uint32_t end)
|
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(lhs != NULL);
|
||||||
JS_ASSERT(name != NULL);
|
JS_ASSERT(name != NULL);
|
||||||
|
@ -1192,7 +1192,7 @@ class PropertyByValue : public ParseNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PropertyByValue(ParseNode *lhs, ParseNode *propExpr, uint32_t begin, uint32_t end)
|
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.left = lhs;
|
||||||
pn_u.binary.right = propExpr;
|
pn_u.binary.right = propExpr;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче