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

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

Issue 19214002: Revert 15635: Turn ElementsTransitionAndStore stub into a HydrogenCodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« no previous file with comments | « src/code-stubs.cc ('k') | src/elements-kind.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 d5bb5e7ed15113a4931b545ce87060344dab98a3..16f4ac019ec47d456fdb81ec7dd2d013354c8cfb 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -908,75 +908,4 @@ Handle<Code> StoreGlobalStub::GenerateCode() {
}
-template<>
-HValue* CodeStubGraphBuilder<ElementsTransitionAndStoreStub>::BuildCodeStub() {
- ElementsTransitionAndStoreStub* stub = casted_stub();
- ElementsKind from_kind = stub->from();
- ElementsKind to_kind = stub->to();
-
- HValue* value = GetParameter(0);
- HValue* target_map = GetParameter(1);
- HValue* key = GetParameter(2);
- HValue* object = GetParameter(3);
-
- if (FLAG_trace_elements_transitions) {
- // Tracing elements transitions is the job of the runtime.
- current_block()->FinishExitWithDeoptimization(HDeoptimize::kUseAll);
- set_current_block(NULL);
- return value;
- }
-
- info()->MarkAsSavesCallerDoubles();
-
- if (AllocationSite::GetMode(from_kind, to_kind) == TRACK_ALLOCATION_SITE) {
- Add<HTrapAllocationMemento>(object);
- }
-
- // Check if we need to transition the array elements first
- // (either SMI -> Double or Double -> Object).
- if (DoesTransitionChangeElementsBufferFormat(from_kind, to_kind)) {
- HInstruction* array_length = NULL;
- if (stub->is_jsarray()) {
- array_length = AddLoad(object, HObjectAccess::ForArrayLength());
- } else {
- array_length = AddLoadFixedArrayLength(AddLoadElements(object));
- }
- array_length->set_type(HType::Smi());
-
- IfBuilder if_builder(this);
-
- // Check if we have any elements.
- if_builder.IfNot<HCompareNumericAndBranch>(array_length,
- graph()->GetConstant0(),
- Token::EQ);
- if_builder.Then();
-
- HInstruction* elements = AddLoadElements(object);
-
- HInstruction* elements_length = AddLoadFixedArrayLength(elements);
-
- BuildGrowElementsCapacity(object, elements, from_kind, to_kind,
- array_length, elements_length);
-
- if_builder.End();
- }
-
- // Set transitioned map.
- AddStore(object, HObjectAccess::ForMap(), target_map);
-
- // Generate the actual store.
- BuildUncheckedMonomorphicElementAccess(object, key, value, NULL,
- stub->is_jsarray(), to_kind,
- true, ALLOW_RETURN_HOLE,
- stub->store_mode());
-
- return value;
-}
-
-
-Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() {
- return DoGenerateCode(this);
-}
-
-
} } // namespace v8::internal
« no previous file with comments | « src/code-stubs.cc ('k') | src/elements-kind.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698