Fixing static dotted expressions.

This commit is contained in:
beard%netscape.com 2000-06-29 04:23:20 +00:00
Родитель 7a512866fd
Коммит b202adfd39
2 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

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