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

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

Issue 132963012: Pretenure call new support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 10 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/factory.h » ('j') | src/hydrogen.cc » ('J')
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 9fcb0b37b9f6b3825b458f207d20dfec26238cb0..78be0959b9a27b0240466b3c5f3aed9d2fd69a79 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -474,76 +474,6 @@ Handle<Code> FastCloneShallowObjectStub::GenerateCode(Isolate* isolate) {
template <>
-HValue* CodeStubGraphBuilder<CreateAllocationSiteStub>::BuildCodeStub() {
- HValue* size = Add<HConstant>(AllocationSite::kSize);
- HInstruction* object = Add<HAllocate>(size, HType::JSObject(), TENURED,
- JS_OBJECT_TYPE);
-
- // Store the map
- Handle<Map> allocation_site_map = isolate()->factory()->allocation_site_map();
- AddStoreMapConstant(object, allocation_site_map);
-
- // Store the payload (smi elements kind)
- HValue* initial_elements_kind = Add<HConstant>(GetInitialFastElementsKind());
- Add<HStoreNamedField>(object,
- HObjectAccess::ForAllocationSiteOffset(
- AllocationSite::kTransitionInfoOffset),
- initial_elements_kind);
-
- // Unlike literals, constructed arrays don't have nested sites
- Add<HStoreNamedField>(object,
- HObjectAccess::ForAllocationSiteOffset(
- AllocationSite::kNestedSiteOffset),
- graph()->GetConstant0());
-
- // Pretenuring calculation field.
- Add<HStoreNamedField>(object,
- HObjectAccess::ForAllocationSiteOffset(
- AllocationSite::kPretenureDataOffset),
- graph()->GetConstant0());
-
- // Pretenuring memento creation count field.
- Add<HStoreNamedField>(object,
- HObjectAccess::ForAllocationSiteOffset(
- AllocationSite::kPretenureCreateCountOffset),
- graph()->GetConstant0());
-
- // Store an empty fixed array for the code dependency.
- HConstant* empty_fixed_array =
- Add<HConstant>(isolate()->factory()->empty_fixed_array());
- HStoreNamedField* store = Add<HStoreNamedField>(
- object,
- HObjectAccess::ForAllocationSiteOffset(
- AllocationSite::kDependentCodeOffset),
- empty_fixed_array);
-
- // Link the object to the allocation site list
- HValue* site_list = Add<HConstant>(
- ExternalReference::allocation_sites_list_address(isolate()));
- HValue* site = Add<HLoadNamedField>(
- site_list, static_cast<HValue*>(NULL),
- HObjectAccess::ForAllocationSiteList());
- store = Add<HStoreNamedField>(object,
- HObjectAccess::ForAllocationSiteOffset(AllocationSite::kWeakNextOffset),
- site);
- store->SkipWriteBarrier();
- Add<HStoreNamedField>(site_list, HObjectAccess::ForAllocationSiteList(),
- object);
-
- HInstruction* feedback_vector = GetParameter(0);
- HInstruction* slot = GetParameter(1);
- Add<HStoreKeyed>(feedback_vector, slot, object, FAST_ELEMENTS,
- INITIALIZING_STORE);
- return feedback_vector;
-}
-
-
-Handle<Code> CreateAllocationSiteStub::GenerateCode(Isolate* isolate) {
- return DoGenerateCode(isolate, this);
-}
-
-
-template <>
HValue* CodeStubGraphBuilder<KeyedLoadFastElementStub>::BuildCodeStub() {
HInstruction* load = BuildUncheckedMonomorphicElementAccess(
GetParameter(0), GetParameter(1), NULL,
« no previous file with comments | « src/code-stubs.cc ('k') | src/factory.h » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698