| 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" |
| 11 #include "src/extensions/free-buffer-extension.h" | 11 #include "src/extensions/free-buffer-extension.h" |
| 12 #include "src/extensions/gc-extension.h" | 12 #include "src/extensions/gc-extension.h" |
| 13 #include "src/extensions/statistics-extension.h" | 13 #include "src/extensions/statistics-extension.h" |
| 14 #include "src/extensions/trigger-failure-extension.h" | 14 #include "src/extensions/trigger-failure-extension.h" |
| 15 #include "src/heap/heap.h" | 15 #include "src/heap/heap.h" |
| 16 #include "src/isolate-inl.h" | 16 #include "src/isolate-inl.h" |
| 17 #include "src/snapshot/natives.h" | 17 #include "src/snapshot/natives.h" |
| 18 #include "src/snapshot/snapshot.h" | 18 #include "src/snapshot/snapshot.h" |
| 19 #include "third_party/fdlibm/fdlibm.h" | |
| 20 | |
| 21 #if defined(V8_WASM) | |
| 22 #include "src/wasm/wasm-js.h" | 19 #include "src/wasm/wasm-js.h" |
| 23 #endif | |
| 24 | 20 |
| 25 namespace v8 { | 21 namespace v8 { |
| 26 namespace internal { | 22 namespace internal { |
| 27 | 23 |
| 28 Bootstrapper::Bootstrapper(Isolate* isolate) | 24 Bootstrapper::Bootstrapper(Isolate* isolate) |
| 29 : isolate_(isolate), | 25 : isolate_(isolate), |
| 30 nesting_(0), | 26 nesting_(0), |
| 31 extensions_cache_(Script::TYPE_EXTENSION) {} | 27 extensions_cache_(Script::TYPE_EXTENSION) {} |
| 32 | 28 |
| 33 template <class Source> | 29 template <class Source> |
| (...skipping 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2848 // exposing debug global object doesn't make much sense). | 2844 // exposing debug global object doesn't make much sense). |
| 2849 debug_context->set_security_token(native_context->security_token()); | 2845 debug_context->set_security_token(native_context->security_token()); |
| 2850 Handle<String> debug_string = | 2846 Handle<String> debug_string = |
| 2851 factory->InternalizeUtf8String(FLAG_expose_debug_as); | 2847 factory->InternalizeUtf8String(FLAG_expose_debug_as); |
| 2852 uint32_t index; | 2848 uint32_t index; |
| 2853 if (debug_string->AsArrayIndex(&index)) return true; | 2849 if (debug_string->AsArrayIndex(&index)) return true; |
| 2854 Handle<Object> global_proxy(debug_context->global_proxy(), isolate); | 2850 Handle<Object> global_proxy(debug_context->global_proxy(), isolate); |
| 2855 JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM); | 2851 JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM); |
| 2856 } | 2852 } |
| 2857 | 2853 |
| 2858 #if defined(V8_WASM) | |
| 2859 if (FLAG_expose_wasm) { | 2854 if (FLAG_expose_wasm) { |
| 2860 WasmJs::Install(isolate, global); | 2855 WasmJs::Install(isolate, global); |
| 2861 } | 2856 } |
| 2862 #endif | |
| 2863 | 2857 |
| 2864 return true; | 2858 return true; |
| 2865 } | 2859 } |
| 2866 | 2860 |
| 2867 | 2861 |
| 2868 static uint32_t Hash(RegisteredExtension* extension) { | 2862 static uint32_t Hash(RegisteredExtension* extension) { |
| 2869 return v8::internal::ComputePointerHash(extension); | 2863 return v8::internal::ComputePointerHash(extension); |
| 2870 } | 2864 } |
| 2871 | 2865 |
| 2872 | 2866 |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3352 } | 3346 } |
| 3353 | 3347 |
| 3354 | 3348 |
| 3355 // Called when the top-level V8 mutex is destroyed. | 3349 // Called when the top-level V8 mutex is destroyed. |
| 3356 void Bootstrapper::FreeThreadResources() { | 3350 void Bootstrapper::FreeThreadResources() { |
| 3357 DCHECK(!IsActive()); | 3351 DCHECK(!IsActive()); |
| 3358 } | 3352 } |
| 3359 | 3353 |
| 3360 } // namespace internal | 3354 } // namespace internal |
| 3361 } // namespace v8 | 3355 } // namespace v8 |
| OLD | NEW |