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/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2983 native_context()->set_internal_array_function(*array_function); | 2983 native_context()->set_internal_array_function(*array_function); |
2984 InstallInternalArray(utils, "InternalPackedArray", FAST_ELEMENTS); | 2984 InstallInternalArray(utils, "InternalPackedArray", FAST_ELEMENTS); |
2985 } | 2985 } |
2986 | 2986 |
2987 // Run the rest of the native scripts. | 2987 // Run the rest of the native scripts. |
2988 while (builtin_index < Natives::GetBuiltinsCount()) { | 2988 while (builtin_index < Natives::GetBuiltinsCount()) { |
2989 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false; | 2989 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false; |
2990 } | 2990 } |
2991 | 2991 |
2992 if (!CallUtilsFunction(isolate(), "PostNatives")) return false; | 2992 if (!CallUtilsFunction(isolate(), "PostNatives")) return false; |
| 2993 auto fast_template_instantiations_cache = isolate()->factory()->NewFixedArray( |
| 2994 TemplateInfo::kFastTemplateInstantiationsCacheSize); |
| 2995 native_context()->set_fast_template_instantiations_cache( |
| 2996 *fast_template_instantiations_cache); |
2993 | 2997 |
2994 auto template_instantiations_cache = UnseededNumberDictionary::New( | 2998 auto slow_template_instantiations_cache = UnseededNumberDictionary::New( |
2995 isolate(), ApiNatives::kInitialFunctionCacheSize); | 2999 isolate(), ApiNatives::kInitialFunctionCacheSize); |
2996 native_context()->set_template_instantiations_cache( | 3000 native_context()->set_slow_template_instantiations_cache( |
2997 *template_instantiations_cache); | 3001 *slow_template_instantiations_cache); |
2998 | 3002 |
2999 // Store the map for the %ObjectPrototype% after the natives has been compiled | 3003 // Store the map for the %ObjectPrototype% after the natives has been compiled |
3000 // and the Object function has been set up. | 3004 // and the Object function has been set up. |
3001 Handle<JSFunction> object_function(native_context()->object_function()); | 3005 Handle<JSFunction> object_function(native_context()->object_function()); |
3002 DCHECK(JSObject::cast(object_function->initial_map()->prototype()) | 3006 DCHECK(JSObject::cast(object_function->initial_map()->prototype()) |
3003 ->HasFastProperties()); | 3007 ->HasFastProperties()); |
3004 native_context()->set_object_function_prototype_map( | 3008 native_context()->set_object_function_prototype_map( |
3005 HeapObject::cast(object_function->initial_map()->prototype())->map()); | 3009 HeapObject::cast(object_function->initial_map()->prototype())->map()); |
3006 | 3010 |
3007 // Set up the map for Object.create(null) instances. | 3011 // Set up the map for Object.create(null) instances. |
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4048 } | 4052 } |
4049 | 4053 |
4050 | 4054 |
4051 // Called when the top-level V8 mutex is destroyed. | 4055 // Called when the top-level V8 mutex is destroyed. |
4052 void Bootstrapper::FreeThreadResources() { | 4056 void Bootstrapper::FreeThreadResources() { |
4053 DCHECK(!IsActive()); | 4057 DCHECK(!IsActive()); |
4054 } | 4058 } |
4055 | 4059 |
4056 } // namespace internal | 4060 } // namespace internal |
4057 } // namespace v8 | 4061 } // namespace v8 |
OLD | NEW |