Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Unified Diff: src/ia32/lithium-ia32.cc

Issue 21536003: Migrate instance of deprecated maps in HCheckMaps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Port to ARM Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698