mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 20:22:00 +00:00
Fixing static dotted expressions.
This commit is contained in:
parent
7a512866fd
commit
b202adfd39
@ -430,7 +430,8 @@ TypedRegister ICodeGenerator::methodCall(TypedRegister targetBase, TypedRegister
|
||||
TypedRegister ICodeGenerator::staticCall(JSClass *c, const StringAtom &name, RegisterList args)
|
||||
{
|
||||
TypedRegister dest(getRegister(), &Any_Type);
|
||||
StaticCall *instr = new StaticCall(dest, c, &name, args);
|
||||
const JSSlot& slot = c->getStatic(name);
|
||||
StaticCall *instr = new StaticCall(dest, c, slot.mIndex, args);
|
||||
iCode->push_back(instr);
|
||||
return dest;
|
||||
}
|
||||
@ -694,8 +695,10 @@ TypedRegister ICodeGenerator::handleDot(BinaryExprNode *b, ExprNode::Kind use, I
|
||||
v = getSlot(base, slotIndex);
|
||||
break;
|
||||
}
|
||||
if (use == ExprNode::dot)
|
||||
if (use == ExprNode::dot) {
|
||||
ret = v;
|
||||
break;
|
||||
}
|
||||
ret = op(mapExprNodeToICodeOp(use), v, ret);
|
||||
// fall thru...
|
||||
case ExprNode::assignment:
|
||||
|
@ -430,7 +430,8 @@ TypedRegister ICodeGenerator::methodCall(TypedRegister targetBase, TypedRegister
|
||||
TypedRegister ICodeGenerator::staticCall(JSClass *c, const StringAtom &name, RegisterList args)
|
||||
{
|
||||
TypedRegister dest(getRegister(), &Any_Type);
|
||||
StaticCall *instr = new StaticCall(dest, c, &name, args);
|
||||
const JSSlot& slot = c->getStatic(name);
|
||||
StaticCall *instr = new StaticCall(dest, c, slot.mIndex, args);
|
||||
iCode->push_back(instr);
|
||||
return dest;
|
||||
}
|
||||
@ -694,8 +695,10 @@ TypedRegister ICodeGenerator::handleDot(BinaryExprNode *b, ExprNode::Kind use, I
|
||||
v = getSlot(base, slotIndex);
|
||||
break;
|
||||
}
|
||||
if (use == ExprNode::dot)
|
||||
if (use == ExprNode::dot) {
|
||||
ret = v;
|
||||
break;
|
||||
}
|
||||
ret = op(mapExprNodeToICodeOp(use), v, ret);
|
||||
// fall thru...
|
||||
case ExprNode::assignment:
|
||||
|
Loading…
x
Reference in New Issue
Block a user