Chromium Code Reviews| Index: src/code-stubs-hydrogen.cc |
| diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
| index 531c25c2b1e26d608f828925f94a07688d12b9f1..f777fd74ffce4e2e69cd7053118f87be9163aa97 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); |
|
Jakob Kummerow
2013/07/22 16:53:12
I don't understand why this Push/Pop sequence is n
danno
2013/07/23 12:18:14
Sort of. The problem is that there was no real mer
|
| checker.ElseDeopt(); |
| - return object; |
| + checker.End(); |
| + |
| + return environment()->Pop(); |
| } |
| @@ -852,8 +856,7 @@ HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() { |
| if (stub->is_constant()) { |
| // Assume every store to a constant value changes it. |
| - current_block()->FinishExitWithDeoptimization(HDeoptimize::kUseAll); |
| - set_current_block(NULL); |
| + Add<HDeoptimize>(Deoptimizer::EAGER); |
| } else { |
| HValue* cell = Add<HConstant>(placeholder_cell, Representation::Tagged()); |
| @@ -894,8 +897,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(); |