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 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 } | 1144 } |
1145 | 1145 |
1146 { // -- A r r a y B u f f e r | 1146 { // -- A r r a y B u f f e r |
1147 Handle<JSFunction> array_buffer_fun = | 1147 Handle<JSFunction> array_buffer_fun = |
1148 InstallFunction( | 1148 InstallFunction( |
1149 global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, | 1149 global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, |
1150 JSArrayBuffer::kSizeWithInternalFields, | 1150 JSArrayBuffer::kSizeWithInternalFields, |
1151 isolate->initial_object_prototype(), | 1151 isolate->initial_object_prototype(), |
1152 Builtins::kIllegal); | 1152 Builtins::kIllegal); |
1153 native_context()->set_array_buffer_fun(*array_buffer_fun); | 1153 native_context()->set_array_buffer_fun(*array_buffer_fun); |
| 1154 native_context()->set_array_buffer_map(array_buffer_fun->initial_map()); |
1154 } | 1155 } |
1155 | 1156 |
1156 { // -- T y p e d A r r a y s | 1157 { // -- T y p e d A r r a y s |
1157 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ | 1158 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ |
1158 { \ | 1159 { \ |
1159 Handle<JSFunction> fun; \ | 1160 Handle<JSFunction> fun; \ |
1160 Handle<Map> external_map; \ | 1161 Handle<Map> external_map; \ |
1161 InstallTypedArray(#Type "Array", \ | 1162 InstallTypedArray(#Type "Array", \ |
1162 TYPE##_ELEMENTS, \ | 1163 TYPE##_ELEMENTS, \ |
1163 &fun, \ | 1164 &fun, \ |
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2959 return from + sizeof(NestingCounterType); | 2960 return from + sizeof(NestingCounterType); |
2960 } | 2961 } |
2961 | 2962 |
2962 | 2963 |
2963 // Called when the top-level V8 mutex is destroyed. | 2964 // Called when the top-level V8 mutex is destroyed. |
2964 void Bootstrapper::FreeThreadResources() { | 2965 void Bootstrapper::FreeThreadResources() { |
2965 DCHECK(!IsActive()); | 2966 DCHECK(!IsActive()); |
2966 } | 2967 } |
2967 | 2968 |
2968 } } // namespace v8::internal | 2969 } } // namespace v8::internal |
OLD | NEW |