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

Unified Diff: src/bootstrapper.cc

Issue 1145213005: [strong] cache strong object literal maps (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix map comparison Created 5 years, 7 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 | « include/v8.h ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 30c6755b42deda493e429ab90cff06d9f173ff68..786e42be47805d1cc77ae8b16c0e23f2f50ee845 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -531,6 +531,12 @@ Handle<JSFunction> Genesis::CreateEmptyFunction(Isolate* isolate) {
native_context()->set_initial_array_prototype(*object_function_prototype);
Accessors::FunctionSetPrototype(object_fun, object_function_prototype)
.Assert();
+
+ // Allocate initial strong object map.
+ Handle<Map> strong_object_map =
+ Map::Copy(object_function_map, "EmptyStrongObject");
+ strong_object_map->set_is_strong();
+ native_context()->set_js_object_strong_map(*strong_object_map);
}
// Allocate the empty function as the prototype for function - ES6 19.2.3
@@ -706,7 +712,7 @@ Handle<Map> Genesis::CreateStrongFunctionMap(
map->set_function_with_prototype(is_constructor);
Map::SetPrototype(map, empty_function);
map->set_is_extensible(is_constructor);
- map->set_is_strong(true);
+ map->set_is_strong();
return map;
}
@@ -1020,7 +1026,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
Handle<Map> initial_strong_map =
Map::Copy(initial_map, "SetInstancePrototype");
- initial_strong_map->set_is_strong(true);
+ initial_strong_map->set_is_strong();
CacheInitialJSArrayMaps(native_context(), initial_strong_map);
}
« no previous file with comments | « include/v8.h ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698