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