| OLD | NEW |
| 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 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2404 | 2404 |
| 2405 for (++i; i < Natives::GetBuiltinsCount(); ++i) { | 2405 for (++i; i < Natives::GetBuiltinsCount(); ++i) { |
| 2406 if (!Bootstrapper::CompileBuiltin(isolate(), i)) return false; | 2406 if (!Bootstrapper::CompileBuiltin(isolate(), i)) return false; |
| 2407 } | 2407 } |
| 2408 | 2408 |
| 2409 if (!CallUtilsFunction(isolate(), "PostNatives")) return false; | 2409 if (!CallUtilsFunction(isolate(), "PostNatives")) return false; |
| 2410 | 2410 |
| 2411 InstallNativeFunctions(); | 2411 InstallNativeFunctions(); |
| 2412 | 2412 |
| 2413 auto function_cache = | 2413 auto function_cache = |
| 2414 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize, | 2414 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize); |
| 2415 USE_CUSTOM_MINIMUM_CAPACITY); | |
| 2416 native_context()->set_function_cache(*function_cache); | 2415 native_context()->set_function_cache(*function_cache); |
| 2417 | 2416 |
| 2418 // Store the map for the string prototype after the natives has been compiled | 2417 // Store the map for the string prototype after the natives has been compiled |
| 2419 // and the String function has been set up. | 2418 // and the String function has been set up. |
| 2420 Handle<JSFunction> string_function(native_context()->string_function()); | 2419 Handle<JSFunction> string_function(native_context()->string_function()); |
| 2421 DCHECK(JSObject::cast( | 2420 DCHECK(JSObject::cast( |
| 2422 string_function->initial_map()->prototype())->HasFastProperties()); | 2421 string_function->initial_map()->prototype())->HasFastProperties()); |
| 2423 native_context()->set_string_function_prototype_map( | 2422 native_context()->set_string_function_prototype_map( |
| 2424 HeapObject::cast(string_function->initial_map()->prototype())->map()); | 2423 HeapObject::cast(string_function->initial_map()->prototype())->map()); |
| 2425 | 2424 |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3305 } | 3304 } |
| 3306 | 3305 |
| 3307 | 3306 |
| 3308 // Called when the top-level V8 mutex is destroyed. | 3307 // Called when the top-level V8 mutex is destroyed. |
| 3309 void Bootstrapper::FreeThreadResources() { | 3308 void Bootstrapper::FreeThreadResources() { |
| 3310 DCHECK(!IsActive()); | 3309 DCHECK(!IsActive()); |
| 3311 } | 3310 } |
| 3312 | 3311 |
| 3313 } // namespace internal | 3312 } // namespace internal |
| 3314 } // namespace v8 | 3313 } // namespace v8 |
| OLD | NEW |