Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 9ec2faf97275459b6abba7bf1f02000cf1eb424b..b1ef0775b2f7b72924b19c09dcae85007af34eb8 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1090,10 +1090,11 @@ LInstruction* LChunkBuilder::DoTest(HTest* instr) { |
UseRegisterAtStart(compare->right())); |
} else if (v->IsInstanceOf()) { |
HInstanceOf* instance_of = HInstanceOf::cast(v); |
+ LOperand* left = UseFixed(instance_of->left(), InstanceofStub::left()); |
+ LOperand* right = UseFixed(instance_of->right(), InstanceofStub::right()); |
+ LOperand* context = UseFixed(instance_of->context(), esi); |
LInstanceOfAndBranch* result = |
- new LInstanceOfAndBranch( |
- UseFixed(instance_of->left(), InstanceofStub::left()), |
- UseFixed(instance_of->right(), InstanceofStub::right())); |
+ new LInstanceOfAndBranch(context, left, right); |
return MarkAsCall(result, instr); |
} else if (v->IsTypeofIs()) { |
HTypeofIs* typeof_is = HTypeofIs::cast(v); |
@@ -1134,9 +1135,10 @@ LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) { |
LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) { |
- LInstanceOf* result = |
- new LInstanceOf(UseFixed(instr->left(), InstanceofStub::left()), |
- UseFixed(instr->right(), InstanceofStub::right())); |
+ LOperand* left = UseFixed(instr->left(), InstanceofStub::left()); |
+ LOperand* right = UseFixed(instr->right(), InstanceofStub::right()); |
+ LOperand* context = UseFixed(instr->context(), esi); |
+ LInstanceOf* result = new LInstanceOf(context, left, right); |
return MarkAsCall(DefineFixed(result, eax), instr); |
} |
@@ -1232,21 +1234,27 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { |
ASSERT(instr->key()->representation().IsTagged()); |
- argument_count_ -= instr->argument_count(); |
+ LOperand* context = UseFixed(instr->context(), esi); |
fschneider
2011/02/09 13:41:53
I'm not sure if it is worth mentioning the context
|
LOperand* key = UseFixed(instr->key(), ecx); |
- return MarkAsCall(DefineFixed(new LCallKeyed(key), eax), instr); |
+ argument_count_ -= instr->argument_count(); |
+ LCallKeyed* result = new LCallKeyed(context, key); |
+ return MarkAsCall(DefineFixed(result, eax), instr); |
} |
LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) { |
+ LOperand* context = UseFixed(instr->context(), esi); |
argument_count_ -= instr->argument_count(); |
- return MarkAsCall(DefineFixed(new LCallNamed, eax), instr); |
+ LCallNamed* result = new LCallNamed(context); |
+ return MarkAsCall(DefineFixed(result, eax), instr); |
} |
LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) { |
+ LOperand* context = UseFixed(instr->context(), esi); |
argument_count_ -= instr->argument_count(); |
- return MarkAsCall(DefineFixed(new LCallGlobal, eax), instr); |
+ LCallGlobal* result = new LCallGlobal(context); |
+ return MarkAsCall(DefineFixed(result, eax), instr); |
} |
@@ -1257,16 +1265,19 @@ LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) { |
LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { |
+ LOperand* context = UseFixed(instr->context(), esi); |
LOperand* constructor = UseFixed(instr->constructor(), edi); |
argument_count_ -= instr->argument_count(); |
- LCallNew* result = new LCallNew(constructor); |
+ LCallNew* result = new LCallNew(context, constructor); |
return MarkAsCall(DefineFixed(result, eax), instr); |
} |
LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { |
+ LOperand* context = UseFixed(instr->context(), esi); |
argument_count_ -= instr->argument_count(); |
- return MarkAsCall(DefineFixed(new LCallFunction, eax), instr); |
+ LCallFunction* result = new LCallFunction(context); |
+ return MarkAsCall(DefineFixed(result, eax), instr); |
} |
@@ -1733,8 +1744,9 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
+ LOperand* context = UseFixed(instr->context(), esi); |
LOperand* object = UseFixed(instr->object(), eax); |
- LLoadNamedGeneric* result = new LLoadNamedGeneric(object); |
+ LLoadNamedGeneric* result = new LLoadNamedGeneric(context, object); |
return MarkAsCall(DefineFixed(result, eax), instr); |
} |
@@ -1765,10 +1777,11 @@ LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
+ LOperand* context = UseFixed(instr->context(), esi); |
LOperand* object = UseFixed(instr->object(), edx); |
LOperand* key = UseFixed(instr->key(), eax); |
- LLoadKeyedGeneric* result = new LLoadKeyedGeneric(object, key); |
+ LLoadKeyedGeneric* result = new LLoadKeyedGeneric(context, object, key); |
return MarkAsCall(DefineFixed(result, eax), instr); |
} |
@@ -1793,15 +1806,18 @@ LInstruction* LChunkBuilder::DoStoreKeyedFastElement( |
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
- LOperand* obj = UseFixed(instr->object(), edx); |
+ LOperand* context = UseFixed(instr->context(), esi); |
+ LOperand* object = UseFixed(instr->object(), edx); |
LOperand* key = UseFixed(instr->key(), ecx); |
- LOperand* val = UseFixed(instr->value(), eax); |
+ LOperand* value = UseFixed(instr->value(), eax); |
ASSERT(instr->object()->representation().IsTagged()); |
ASSERT(instr->key()->representation().IsTagged()); |
ASSERT(instr->value()->representation().IsTagged()); |
- return MarkAsCall(new LStoreKeyedGeneric(obj, key, val), instr); |
+ LStoreKeyedGeneric* result = |
+ new LStoreKeyedGeneric(context, object, key, value); |
+ return MarkAsCall(result, instr); |
} |
@@ -1827,10 +1843,11 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
- LOperand* obj = UseFixed(instr->object(), edx); |
- LOperand* val = UseFixed(instr->value(), eax); |
+ LOperand* context = UseFixed(instr->context(), esi); |
+ LOperand* object = UseFixed(instr->object(), edx); |
+ LOperand* value = UseFixed(instr->value(), eax); |
- LStoreNamedGeneric* result = new LStoreNamedGeneric(obj, val); |
+ LStoreNamedGeneric* result = new LStoreNamedGeneric(context, object, value); |
return MarkAsCall(result, instr); |
} |
@@ -1855,7 +1872,8 @@ LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) { |
LInstruction* LChunkBuilder::DoObjectLiteral(HObjectLiteral* instr) { |
- return MarkAsCall(DefineFixed(new LObjectLiteral, eax), instr); |
+ LOperand* context = UseFixed(instr->context(), esi); |
+ return MarkAsCall(DefineFixed(new LObjectLiteral(context), eax), instr); |
} |
@@ -1896,8 +1914,10 @@ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { |
+ LOperand* context = UseFixed(instr->context(), esi); |
argument_count_ -= instr->argument_count(); |
- return MarkAsCall(DefineFixed(new LCallStub, eax), instr); |
+ LCallStub* result = new LCallStub(context); |
+ return MarkAsCall(DefineFixed(result, eax), instr); |
} |