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

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

Issue 18357004: Revert r15419: "Generate StoreGlobal stubs with Hydrogen" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
« no previous file with comments | « src/code-stubs.cc ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index a1417da690d22e623058a552241d0234db0abd4c..06c9039614ce2c1c8e658d602b0ac5fb9305010f 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -771,7 +771,7 @@ HValue* CodeStubGraphBuilder<ToBooleanStub>::BuildCodeInitializedStub() {
IfBuilder if_true(this);
if_true.If<HBranch>(GetParameter(0), stub->GetTypes());
if_true.Then();
- if_true.Return(graph()->GetConstant1());
+ if_true.Return(graph()->GetConstant1());
if_true.Else();
if_true.End();
return graph()->GetConstant0();
@@ -783,49 +783,4 @@ Handle<Code> ToBooleanStub::GenerateCode() {
}
-template <>
-HValue* CodeStubGraphBuilder<StoreGlobalStub>::BuildCodeInitializedStub() {
- StoreGlobalStub* stub = casted_stub();
- Handle<Object> hole(isolate()->heap()->the_hole_value(), isolate());
- Handle<Object> placeholer_value(Smi::FromInt(0), isolate());
- Handle<PropertyCell> placeholder_cell =
- isolate()->factory()->NewPropertyCell(placeholer_value);
-
- HParameter* receiver = GetParameter(0);
- HParameter* value = GetParameter(2);
-
- if (stub->is_constant()) {
- // Assume every store to a constant value changes it.
- current_block()->FinishExitWithDeoptimization(HDeoptimize::kUseAll);
- set_current_block(NULL);
- } else {
- HValue* cell = Add<HConstant>(placeholder_cell, Representation::Tagged());
- // Check that the map of the global has not changed.
- AddInstruction(HCheckMaps::New(receiver,
- Handle<Map>(isolate()->heap()->meta_map()),
- zone()));
-
- // Load the payload of the global parameter cell. A hole indicates that the
- // property has been deleted and that the store must be handled by the
- // runtime.
- HObjectAccess access(HObjectAccess::ForCellPayload(isolate()));
- HValue* cell_contents = Add<HLoadNamedField>(cell, access);
- IfBuilder builder(this);
- HValue* hole_value = Add<HConstant>(hole, Representation::Tagged());
- builder.If<HCompareObjectEqAndBranch>(cell_contents, hole_value);
- builder.Then();
- builder.Deopt();
- builder.Else();
- Add<HStoreNamedField>(cell, access, value);
- builder.End();
- }
- return value;
-}
-
-
-Handle<Code> StoreGlobalStub::GenerateCode() {
- return DoGenerateCode(this);
-}
-
-
} } // namespace v8::internal
« no previous file with comments | « src/code-stubs.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698