Version 3.11.10
Implemented heap profiler memory usage reporting.
Preserved error message during finally block in try..finally. (Chromium issue 129171)
Fixed EnsureCanContainElements to properly handle double values. (issue 2170)
Improved heuristics to keep objects in fast mode with inherited constructors.
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@11798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/type-info.cc b/src/type-info.cc
index 159be6a..f5e9106 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -61,9 +61,11 @@
TypeFeedbackOracle::TypeFeedbackOracle(Handle<Code> code,
Handle<Context> global_context,
- Isolate* isolate) {
+ Isolate* isolate,
+ Zone* zone) {
global_context_ = global_context;
isolate_ = isolate;
+ zone_ = zone;
BuildDictionary(code);
ASSERT(reinterpret_cast<Address>(*dictionary_.location()) != kHandleZapValue);
}
@@ -501,10 +503,10 @@
// we need a generic store (or load) here.
ASSERT(Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC);
} else if (object->IsMap()) {
- types->Add(Handle<Map>::cast(object));
+ types->Add(Handle<Map>::cast(object), zone());
} else if (FLAG_collect_megamorphic_maps_from_stub_cache &&
Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) {
- types->Reserve(4);
+ types->Reserve(4, zone());
ASSERT(object->IsCode());
isolate_->stub_cache()->CollectMatchingMaps(types,
*name,
@@ -548,11 +550,12 @@
}
-static void AddMapIfMissing(Handle<Map> map, SmallMapList* list) {
+static void AddMapIfMissing(Handle<Map> map, SmallMapList* list,
+ Zone* zone) {
for (int i = 0; i < list->length(); ++i) {
if (list->at(i).is_identical_to(map)) return;
}
- list->Add(map);
+ list->Add(map, zone);
}
@@ -571,7 +574,7 @@
if (object->IsMap()) {
Map* map = Map::cast(object);
if (!CanRetainOtherContext(map, *global_context_)) {
- AddMapIfMissing(Handle<Map>(map), types);
+ AddMapIfMissing(Handle<Map>(map), types, zone());
}
}
}
@@ -591,7 +594,7 @@
// infos before we process them.
void TypeFeedbackOracle::BuildDictionary(Handle<Code> code) {
AssertNoAllocation no_allocation;
- ZoneList<RelocInfo> infos(16);
+ ZoneList<RelocInfo> infos(16, zone());
HandleScope scope;
GetRelocInfos(code, &infos);
CreateDictionary(code, &infos);
@@ -606,7 +609,7 @@
ZoneList<RelocInfo>* infos) {
int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID);
for (RelocIterator it(*code, mask); !it.done(); it.next()) {
- infos->Add(*it.rinfo());
+ infos->Add(*it.rinfo(), zone());
}
}