| 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/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
| (...skipping 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2662 InstallInternalArray(utils, "InternalPackedArray", FAST_ELEMENTS); | 2662 InstallInternalArray(utils, "InternalPackedArray", FAST_ELEMENTS); |
| 2663 } | 2663 } |
| 2664 | 2664 |
| 2665 // Run the rest of the native scripts. | 2665 // Run the rest of the native scripts. |
| 2666 while (builtin_index < Natives::GetBuiltinsCount()) { | 2666 while (builtin_index < Natives::GetBuiltinsCount()) { |
| 2667 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false; | 2667 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false; |
| 2668 } | 2668 } |
| 2669 | 2669 |
| 2670 if (!CallUtilsFunction(isolate(), "PostNatives")) return false; | 2670 if (!CallUtilsFunction(isolate(), "PostNatives")) return false; |
| 2671 | 2671 |
| 2672 auto template_instantiations_cache = | 2672 auto function_cache = |
| 2673 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize, | 2673 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize, |
| 2674 USE_CUSTOM_MINIMUM_CAPACITY); | 2674 USE_CUSTOM_MINIMUM_CAPACITY); |
| 2675 native_context()->set_template_instantiations_cache( | 2675 native_context()->set_function_cache(*function_cache); |
| 2676 *template_instantiations_cache); | |
| 2677 | 2676 |
| 2678 // Store the map for the %ObjectPrototype% after the natives has been compiled | 2677 // Store the map for the %ObjectPrototype% after the natives has been compiled |
| 2679 // and the Object function has been set up. | 2678 // and the Object function has been set up. |
| 2680 Handle<JSFunction> object_function(native_context()->object_function()); | 2679 Handle<JSFunction> object_function(native_context()->object_function()); |
| 2681 DCHECK(JSObject::cast(object_function->initial_map()->prototype()) | 2680 DCHECK(JSObject::cast(object_function->initial_map()->prototype()) |
| 2682 ->HasFastProperties()); | 2681 ->HasFastProperties()); |
| 2683 native_context()->set_object_function_prototype_map( | 2682 native_context()->set_object_function_prototype_map( |
| 2684 HeapObject::cast(object_function->initial_map()->prototype())->map()); | 2683 HeapObject::cast(object_function->initial_map()->prototype())->map()); |
| 2685 | 2684 |
| 2686 // Store the map for the %StringPrototype% after the natives has been compiled | 2685 // Store the map for the %StringPrototype% after the natives has been compiled |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3631 } | 3630 } |
| 3632 | 3631 |
| 3633 | 3632 |
| 3634 // Called when the top-level V8 mutex is destroyed. | 3633 // Called when the top-level V8 mutex is destroyed. |
| 3635 void Bootstrapper::FreeThreadResources() { | 3634 void Bootstrapper::FreeThreadResources() { |
| 3636 DCHECK(!IsActive()); | 3635 DCHECK(!IsActive()); |
| 3637 } | 3636 } |
| 3638 | 3637 |
| 3639 } // namespace internal | 3638 } // namespace internal |
| 3640 } // namespace v8 | 3639 } // namespace v8 |
| OLD | NEW |