Fix operand type for keyed calls.

Record the key as a input operand for keyed call instructions instead
of wrongly making it a temp operand.

This bug does currently not show up as a problem because the 
uses are recorded only in the instruction summary.

Review URL: http://codereview.chromium.org/6368003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
fschneider@chromium.org 2011-01-18 14:25:05 +00:00
parent ec16aa9a17
commit 2ecfe94997
3 changed files with 6 additions and 5 deletions

View File

@ -2506,6 +2506,7 @@ void LCodeGen::DoUnaryMathOperation(LUnaryMathOperation* instr) {
void LCodeGen::DoCallKeyed(LCallKeyed* instr) {
ASSERT(ToRegister(instr->result()).is(eax));
ASSERT(ToRegister(instr->InputAt(0)).is(ecx));
int arity = instr->arity();
Handle<Code> ic = StubCache::ComputeKeyedCallInitialize(arity, NOT_IN_LOOP);

View File

@ -1166,8 +1166,8 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) {
ASSERT(instr->key()->representation().IsTagged());
argument_count_ -= instr->argument_count();
LOperand* temp = UseFixed(instr->key(), ecx);
return MarkAsCall(DefineFixed(new LCallKeyed(temp), eax), instr);
LOperand* key = UseFixed(instr->key(), ecx);
return MarkAsCall(DefineFixed(new LCallKeyed(key), eax), instr);
}

View File

@ -1325,10 +1325,10 @@ class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> {
};
class LCallKeyed: public LTemplateInstruction<1, 0, 1> {
class LCallKeyed: public LTemplateInstruction<1, 1, 0> {
public:
explicit LCallKeyed(LOperand* temp) {
temps_[0] = temp;
explicit LCallKeyed(LOperand* key) {
inputs_[0] = key;
}
DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")