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

Unified Diff: src/bootstrapper.cc

Issue 1366563002: [builtins] Re-add similar String wrapper optimization for StringAdd. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | src/code-stubs-hydrogen.cc » ('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 386d8cafebcb430ebdab73ccc1113aa75808d35a..b40a96a49430cc30d760d0602b26760118df1fbf 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2334,7 +2334,15 @@ bool Genesis::InstallNatives(ContextType context_type) {
USE_CUSTOM_MINIMUM_CAPACITY);
native_context()->set_function_cache(*function_cache);
- // Store the map for the string prototype after the natives has been compiled
+ // Store the map for the %ObjectPrototype% after the natives has been compiled
+ // and the Object function has been set up.
+ Handle<JSFunction> object_function(native_context()->object_function());
+ DCHECK(JSObject::cast(object_function->initial_map()->prototype())
+ ->HasFastProperties());
+ native_context()->set_object_function_prototype_map(
+ HeapObject::cast(object_function->initial_map()->prototype())->map());
+
+ // Store the map for the %StringPrototype% after the natives has been compiled
// and the String function has been set up.
Handle<JSFunction> string_function(native_context()->string_function());
DCHECK(JSObject::cast(
« no previous file with comments | « no previous file | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698