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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 // search for the 'Array' property on the global object and use that one | 1009 // search for the 'Array' property on the global object and use that one |
1010 // as the constructor. 'Array' property on a global object can be | 1010 // as the constructor. 'Array' property on a global object can be |
1011 // overwritten by JS code. | 1011 // overwritten by JS code. |
1012 native_context()->set_array_function(*array_function); | 1012 native_context()->set_array_function(*array_function); |
1013 | 1013 |
1014 // Cache the array maps, needed by ArrayConstructorStub | 1014 // Cache the array maps, needed by ArrayConstructorStub |
1015 CacheInitialJSArrayMaps(native_context(), initial_map); | 1015 CacheInitialJSArrayMaps(native_context(), initial_map); |
1016 ArrayConstructorStub array_constructor_stub(isolate); | 1016 ArrayConstructorStub array_constructor_stub(isolate); |
1017 Handle<Code> code = array_constructor_stub.GetCode(); | 1017 Handle<Code> code = array_constructor_stub.GetCode(); |
1018 array_function->shared()->set_construct_stub(*code); | 1018 array_function->shared()->set_construct_stub(*code); |
| 1019 |
| 1020 Handle<Map> initial_strong_map = |
| 1021 Map::Copy(initial_map, "SetInstancePrototype"); |
| 1022 initial_strong_map->set_is_strong(true); |
| 1023 CacheInitialJSArrayMaps(native_context(), initial_strong_map); |
1019 } | 1024 } |
1020 | 1025 |
1021 { // --- N u m b e r --- | 1026 { // --- N u m b e r --- |
1022 Handle<JSFunction> number_fun = | 1027 Handle<JSFunction> number_fun = |
1023 InstallFunction(global, "Number", JS_VALUE_TYPE, JSValue::kSize, | 1028 InstallFunction(global, "Number", JS_VALUE_TYPE, JSValue::kSize, |
1024 isolate->initial_object_prototype(), | 1029 isolate->initial_object_prototype(), |
1025 Builtins::kIllegal); | 1030 Builtins::kIllegal); |
1026 native_context()->set_number_function(*number_fun); | 1031 native_context()->set_number_function(*number_fun); |
1027 } | 1032 } |
1028 | 1033 |
(...skipping 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3032 return from + sizeof(NestingCounterType); | 3037 return from + sizeof(NestingCounterType); |
3033 } | 3038 } |
3034 | 3039 |
3035 | 3040 |
3036 // Called when the top-level V8 mutex is destroyed. | 3041 // Called when the top-level V8 mutex is destroyed. |
3037 void Bootstrapper::FreeThreadResources() { | 3042 void Bootstrapper::FreeThreadResources() { |
3038 DCHECK(!IsActive()); | 3043 DCHECK(!IsActive()); |
3039 } | 3044 } |
3040 | 3045 |
3041 } } // namespace v8::internal | 3046 } } // namespace v8::internal |
OLD | NEW |