Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index daaed525cc3b9f21255640a1cab9cf042f698055..2277460d943984324f16dd2b72cc53c040793a23 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -2190,6 +2190,14 @@ static bool ContainsMap(MapList* maps_list, Map* map) { |
} |
+Handle<Map> Map::FindTransitionedMap(MapHandleList* candidates) { |
+ MapList raw_candidates(candidates->length()); |
+ Map* result = FindTransitionedMap(UnwrapHandleList(&raw_candidates, |
+ candidates)); |
+ return (result == NULL) ? Handle<Map>::null() : Handle<Map>(result); |
+} |
+ |
+ |
Map* Map::FindTransitionedMap(MapList* candidates) { |
ElementsKind elms_kind = elements_kind(); |
if (elms_kind == FAST_DOUBLE_ELEMENTS) { |
@@ -2397,6 +2405,15 @@ MaybeObject* Map::AddElementsTransition(ElementsKind elements_kind, |
} |
+Handle<Map> JSObject::GetElementsTransitionMap(Handle<JSObject> object, |
+ ElementsKind to_kind) { |
+ Isolate* isolate = object->GetIsolate(); |
+ CALL_HEAP_FUNCTION(isolate, |
+ object->GetElementsTransitionMap(to_kind), |
+ Map); |
+} |
+ |
+ |
MaybeObject* JSObject::GetElementsTransitionMap(ElementsKind to_kind) { |
Map* current_map = map(); |
ElementsKind from_kind = current_map->elements_kind(); |
@@ -5124,6 +5141,19 @@ void CodeCacheHashTable::RemoveByIndex(int index) { |
} |
+void PolymorphicCodeCache::Update(Handle<PolymorphicCodeCache> cache, |
+ MapHandleList* maps, |
+ Code::Flags flags, |
+ Handle<Code> code) { |
+ Isolate* isolate = cache->GetIsolate(); |
+ List<Map*> raw_maps(maps->length()); |
+ CALL_HEAP_FUNCTION_VOID( |
+ isolate, |
+ (raw_maps.Clear(), |
Kevin Millikin (Chromium)
2011/10/21 10:13:48
That's a bit annoying, but unavoidable. I suppose
|
+ cache->Update(UnwrapHandleList(&raw_maps, maps), flags, *code))); |
+} |
+ |
+ |
MaybeObject* PolymorphicCodeCache::Update(MapList* maps, |
Code::Flags flags, |
Code* code) { |
@@ -5152,6 +5182,13 @@ MaybeObject* PolymorphicCodeCache::Update(MapList* maps, |
} |
+Handle<Object> PolymorphicCodeCache::Lookup(MapHandleList* maps, |
+ Code::Flags flags) { |
+ List<Map*> raw_maps(maps->length()); |
+ return Handle<Object>(Lookup(UnwrapHandleList(&raw_maps, maps), flags)); |
+} |
+ |
+ |
Object* PolymorphicCodeCache::Lookup(MapList* maps, Code::Flags flags) { |
if (!cache()->IsUndefined()) { |
PolymorphicCodeCacheHashTable* hash_table = |