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