Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 25867adb4668efa7bfaf3e07ab912ead9b5353b1..abcf664876a71032a950f2f543b1e866b7ce504d 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -2061,11 +2061,24 @@ LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
+ LOperand* context = NULL; |
LOperand* value = NULL; |
- if (!instr->CanOmitMapChecks()) value = UseRegisterAtStart(instr->value()); |
- LCheckMaps* result = new(zone()) LCheckMaps(value); |
- if (instr->CanOmitMapChecks()) return result; |
- return AssignEnvironment(result); |
+ if (!instr->CanOmitMapChecks()) { |
+ value = UseRegisterAtStart(instr->value()); |
+ if (instr->has_migration_target()) { |
+ // The context is not actually required for instance migration, so clobber |
+ // the context register to Smi::FromInt(0). |
+ HConstant* clobber_value = graph()->GetConstant0(); |
+ context = UseConstant(clobber_value); |
danno
2013/08/05 14:36:59
I don't think you need any of this new logic, do y
Toon Verwaest
2013/08/05 15:03:26
Done.
|
+ info()->MarkAsDeferredCalling(); |
+ } |
+ } |
+ LCheckMaps* result = new(zone()) LCheckMaps(context, value); |
+ if (!instr->CanOmitMapChecks()) { |
+ AssignEnvironment(result); |
+ if (instr->has_migration_target()) return AssignPointerMap(result); |
+ } |
+ return result; |
} |