Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index 21b034100b64cd36ddf37ae3e406f3980967b181..4b2fc6960d902118a9f864af175584beda704dc0 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -178,7 +178,7 @@ bool CodeStubGraphBuilderBase::BuildGraph() { |
AddInstruction(context_); |
start_environment->BindContext(context_); |
- AddSimulate(BailoutId::StubEntry()); |
+ Add<HSimulate>(BailoutId::StubEntry()); |
NoObservableSideEffectsScope no_effects(this); |
@@ -366,9 +366,10 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
length)); |
} |
- HValue* result = environment()->Pop(); |
checker.ElseDeopt(); |
- return result; |
+ checker.End(); |
+ |
+ return environment()->Pop(); |
} |
@@ -416,8 +417,11 @@ HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() { |
AddStore(object, access, AddLoad(boilerplate, access)); |
} |
+ environment()->Push(object); |
checker.ElseDeopt(); |
- return object; |
+ checker.End(); |
+ |
+ return environment()->Pop(); |
} |
@@ -897,8 +901,7 @@ HValue* CodeStubGraphBuilder<ElementsTransitionAndStoreStub>::BuildCodeStub() { |
if (FLAG_trace_elements_transitions) { |
// Tracing elements transitions is the job of the runtime. |
- current_block()->FinishExitWithDeoptimization(HDeoptimize::kUseAll); |
- set_current_block(NULL); |
+ Add<HDeoptimize>(Deoptimizer::EAGER); |
} else { |
info()->MarkAsSavesCallerDoubles(); |