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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2316 matching lines...) Expand 10 before | Expand all | Expand 10 after
2327 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false; 2327 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false;
2328 } 2328 }
2329 2329
2330 if (!CallUtilsFunction(isolate(), "PostNatives")) return false; 2330 if (!CallUtilsFunction(isolate(), "PostNatives")) return false;
2331 2331
2332 auto function_cache = 2332 auto function_cache =
2333 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize, 2333 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize,
2334 USE_CUSTOM_MINIMUM_CAPACITY); 2334 USE_CUSTOM_MINIMUM_CAPACITY);
2335 native_context()->set_function_cache(*function_cache); 2335 native_context()->set_function_cache(*function_cache);
2336 2336
2337 // Store the map for the string prototype after the natives has been compiled 2337 // Store the map for the %ObjectPrototype% after the natives has been compiled
2338 // and the Object function has been set up.
2339 Handle<JSFunction> object_function(native_context()->object_function());
2340 DCHECK(JSObject::cast(object_function->initial_map()->prototype())
2341 ->HasFastProperties());
2342 native_context()->set_object_function_prototype_map(
2343 HeapObject::cast(object_function->initial_map()->prototype())->map());
2344
2345 // Store the map for the %StringPrototype% after the natives has been compiled
2338 // and the String function has been set up. 2346 // and the String function has been set up.
2339 Handle<JSFunction> string_function(native_context()->string_function()); 2347 Handle<JSFunction> string_function(native_context()->string_function());
2340 DCHECK(JSObject::cast( 2348 DCHECK(JSObject::cast(
2341 string_function->initial_map()->prototype())->HasFastProperties()); 2349 string_function->initial_map()->prototype())->HasFastProperties());
2342 native_context()->set_string_function_prototype_map( 2350 native_context()->set_string_function_prototype_map(
2343 HeapObject::cast(string_function->initial_map()->prototype())->map()); 2351 HeapObject::cast(string_function->initial_map()->prototype())->map());
2344 2352
2345 // Install Date.prototype[@@toPrimitive]. 2353 // Install Date.prototype[@@toPrimitive].
2346 { 2354 {
2347 Handle<String> key = factory()->Date_string(); 2355 Handle<String> key = factory()->Date_string();
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
3258 } 3266 }
3259 3267
3260 3268
3261 // Called when the top-level V8 mutex is destroyed. 3269 // Called when the top-level V8 mutex is destroyed.
3262 void Bootstrapper::FreeThreadResources() { 3270 void Bootstrapper::FreeThreadResources() {
3263 DCHECK(!IsActive()); 3271 DCHECK(!IsActive());
3264 } 3272 }
3265 3273
3266 } // namespace internal 3274 } // namespace internal
3267 } // namespace v8 3275 } // namespace v8
OLDNEW
« 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