Fixing static dotted expressions.

This commit is contained in:
beard%netscape.com 2000-06-29 04:23:20 +00:00
parent 7a512866fd
commit b202adfd39
2 changed files with 10 additions and 4 deletions

View File

@ -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:

View File

@ -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: