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

Unified Diff: src/objects.cc

Issue 13741010: Eagerly parse expected transitions in JSON. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add assert Created 7 years, 8 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 1dc170410951f7e01238815dae3b62340e6f6721..1890eb40954d479ec01dd4339a498f13a0f8de02 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2602,13 +2602,18 @@ MaybeObject* JSObject::GetElementsTransitionMapSlow(ElementsKind to_kind) {
return start_map->CopyAsElementsKind(to_kind, OMIT_TRANSITION);
}
- Map* closest_map = FindClosestElementsTransition(start_map, to_kind);
+ return start_map->AsElementsKind(to_kind);
+}
+
- if (closest_map->elements_kind() == to_kind) {
+MaybeObject* Map::AsElementsKind(ElementsKind kind) {
+ Map* closest_map = FindClosestElementsTransition(this, kind);
+
+ if (closest_map->elements_kind() == kind) {
return closest_map;
}
- return AddMissingElementsTransitions(closest_map, to_kind);
+ return AddMissingElementsTransitions(closest_map, kind);
}
@@ -3073,6 +3078,13 @@ void JSObject::AddFastPropertyUsingMap(Handle<JSObject> object,
}
+void JSObject::TransitionToMap(Handle<JSObject> object, Handle<Map> map) {
+ CALL_HEAP_FUNCTION_VOID(
+ object->GetIsolate(),
+ object->TransitionToMap(*map));
+}
+
+
MaybeObject* JSObject::SetPropertyForResult(LookupResult* lookup,
Name* name_raw,
Object* value_raw,
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698