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

Unified Diff: src/type-info.cc

Issue 7374002: Refactor allocation policies. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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/string-stream.cc ('k') | src/v8globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index defb1ae9666a48da8f41cc83eb7f5e028354da01..2c4101d7c25900610cd91c0cae34101a917d91ea 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -404,11 +404,11 @@ ZoneMapList* TypeFeedbackOracle::CollectReceiverTypes(unsigned ast_id,
ASSERT(Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC);
return NULL;
} else if (object->IsMap()) {
- ZoneMapList* types = new ZoneMapList(1);
+ ZoneMapList* types = ZoneMapList::New(isolate->zone(), 1);
types->Add(Handle<Map>::cast(object));
return types;
} else if (Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) {
- ZoneMapList* types = new ZoneMapList(4);
+ ZoneMapList* types = ZoneMapList::New(isolate->zone(), 4);
ASSERT(object->IsCode());
isolate->stub_cache()->CollectMatchingMaps(types, *name, flags);
return types->length() > 0 ? types : NULL;
@@ -444,9 +444,10 @@ void TypeFeedbackOracle::CollectKeyedReceiverTypes(
// dictionary (possibly triggering GC), and finally we relocate the collected
// infos before we process them.
void TypeFeedbackOracle::BuildDictionary(Handle<Code> code) {
+ Isolate* isolate = code->GetIsolate();
AssertNoAllocation no_allocation;
- ZoneList<RelocInfo> infos(16);
- HandleScope scope;
+ ZoneList<RelocInfo> infos(isolate->zone(), 16);
+ HandleScope scope(isolate);
GetRelocInfos(code, &infos);
CreateDictionary(code, &infos);
ProcessRelocInfos(&infos);
« no previous file with comments | « src/string-stream.cc ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698