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/isolate-inl.h" | 8 #include "src/isolate-inl.h" |
9 #include "src/natives.h" | 9 #include "src/natives.h" |
10 #include "src/snapshot.h" | 10 #include "src/snapshot.h" |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 JSFunction::SetInstancePrototype(cons, | 1064 JSFunction::SetInstancePrototype(cons, |
1065 Handle<Object>(native_context()->initial_object_prototype(), isolate)); | 1065 Handle<Object>(native_context()->initial_object_prototype(), isolate)); |
1066 cons->SetInstanceClassName(*name); | 1066 cons->SetInstanceClassName(*name); |
1067 Handle<JSObject> json_object = factory->NewJSObject(cons, TENURED); | 1067 Handle<JSObject> json_object = factory->NewJSObject(cons, TENURED); |
1068 ASSERT(json_object->IsJSObject()); | 1068 ASSERT(json_object->IsJSObject()); |
1069 JSObject::SetOwnPropertyIgnoreAttributes( | 1069 JSObject::SetOwnPropertyIgnoreAttributes( |
1070 global, name, json_object, DONT_ENUM).Check(); | 1070 global, name, json_object, DONT_ENUM).Check(); |
1071 native_context()->set_json_object(*json_object); | 1071 native_context()->set_json_object(*json_object); |
1072 } | 1072 } |
1073 | 1073 |
1074 { // -- A r r a y B u f f e r | 1074 { // -- A r r a y B u f f e r |
1075 Handle<JSFunction> array_buffer_fun = | 1075 Handle<JSFunction> array_buffer_fun = |
1076 InstallFunction( | 1076 InstallFunction( |
1077 global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, | 1077 global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, |
1078 JSArrayBuffer::kSizeWithInternalFields, | 1078 JSArrayBuffer::kSizeWithInternalFields, |
1079 isolate->initial_object_prototype(), | 1079 isolate->initial_object_prototype(), |
1080 Builtins::kIllegal); | 1080 Builtins::kIllegal); |
1081 native_context()->set_array_buffer_fun(*array_buffer_fun); | 1081 native_context()->set_array_buffer_fun(*array_buffer_fun); |
1082 } | 1082 } |
1083 | 1083 |
1084 { // -- T y p e d A r r a y s | 1084 { // -- T y p e d A r r a y s |
1085 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ | 1085 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ |
1086 { \ | 1086 { \ |
1087 Handle<JSFunction> fun; \ | 1087 Handle<JSFunction> fun; \ |
1088 Handle<Map> external_map; \ | 1088 Handle<Map> external_map; \ |
1089 InstallTypedArray(#Type "Array", \ | 1089 InstallTypedArray(#Type "Array", \ |
1090 TYPE##_ELEMENTS, \ | 1090 TYPE##_ELEMENTS, \ |
1091 &fun, \ | 1091 &fun, \ |
1092 &external_map); \ | 1092 &external_map); \ |
1093 native_context()->set_##type##_array_fun(*fun); \ | 1093 native_context()->set_##type##_array_fun(*fun); \ |
1094 native_context()->set_##type##_array_external_map(*external_map); \ | 1094 native_context()->set_##type##_array_external_map(*external_map); \ |
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2710 return from + sizeof(NestingCounterType); | 2710 return from + sizeof(NestingCounterType); |
2711 } | 2711 } |
2712 | 2712 |
2713 | 2713 |
2714 // Called when the top-level V8 mutex is destroyed. | 2714 // Called when the top-level V8 mutex is destroyed. |
2715 void Bootstrapper::FreeThreadResources() { | 2715 void Bootstrapper::FreeThreadResources() { |
2716 ASSERT(!IsActive()); | 2716 ASSERT(!IsActive()); |
2717 } | 2717 } |
2718 | 2718 |
2719 } } // namespace v8::internal | 2719 } } // namespace v8::internal |
OLD | NEW |