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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 19528003: Unify SoftDeoptimize and Deoptimize hydrogen instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use defaults for Add<HDeoptimize> Created 7 years, 5 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/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();

Powered by Google App Engine
This is Rietveld 408576698