| 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 2390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2401 | 2401 |
| 2402 for (++i; i < Natives::GetBuiltinsCount(); ++i) { | 2402 for (++i; i < Natives::GetBuiltinsCount(); ++i) { |
| 2403 if (!Bootstrapper::CompileBuiltin(isolate(), i)) return false; | 2403 if (!Bootstrapper::CompileBuiltin(isolate(), i)) return false; |
| 2404 } | 2404 } |
| 2405 | 2405 |
| 2406 if (!CallUtilsFunction(isolate(), "PostNatives")) return false; | 2406 if (!CallUtilsFunction(isolate(), "PostNatives")) return false; |
| 2407 | 2407 |
| 2408 InstallNativeFunctions(); | 2408 InstallNativeFunctions(); |
| 2409 | 2409 |
| 2410 auto function_cache = | 2410 auto function_cache = |
| 2411 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize); | 2411 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize, |
| 2412 USE_CUSTOM_MINIMUM_CAPACITY); |
| 2412 native_context()->set_function_cache(*function_cache); | 2413 native_context()->set_function_cache(*function_cache); |
| 2413 | 2414 |
| 2414 // Store the map for the string prototype after the natives has been compiled | 2415 // Store the map for the string prototype after the natives has been compiled |
| 2415 // and the String function has been set up. | 2416 // and the String function has been set up. |
| 2416 Handle<JSFunction> string_function(native_context()->string_function()); | 2417 Handle<JSFunction> string_function(native_context()->string_function()); |
| 2417 DCHECK(JSObject::cast( | 2418 DCHECK(JSObject::cast( |
| 2418 string_function->initial_map()->prototype())->HasFastProperties()); | 2419 string_function->initial_map()->prototype())->HasFastProperties()); |
| 2419 native_context()->set_string_function_prototype_map( | 2420 native_context()->set_string_function_prototype_map( |
| 2420 HeapObject::cast(string_function->initial_map()->prototype())->map()); | 2421 HeapObject::cast(string_function->initial_map()->prototype())->map()); |
| 2421 | 2422 |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3258 } | 3259 } |
| 3259 | 3260 |
| 3260 | 3261 |
| 3261 // Called when the top-level V8 mutex is destroyed. | 3262 // Called when the top-level V8 mutex is destroyed. |
| 3262 void Bootstrapper::FreeThreadResources() { | 3263 void Bootstrapper::FreeThreadResources() { |
| 3263 DCHECK(!IsActive()); | 3264 DCHECK(!IsActive()); |
| 3264 } | 3265 } |
| 3265 | 3266 |
| 3266 } // namespace internal | 3267 } // namespace internal |
| 3267 } // namespace v8 | 3268 } // namespace v8 |
| OLD | NEW |