| 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 2873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2907 // exposing debug global object doesn't make much sense). | 2903 // exposing debug global object doesn't make much sense). |
| 2908 debug_context->set_security_token(native_context->security_token()); | 2904 debug_context->set_security_token(native_context->security_token()); |
| 2909 Handle<String> debug_string = | 2905 Handle<String> debug_string = |
| 2910 factory->InternalizeUtf8String(FLAG_expose_debug_as); | 2906 factory->InternalizeUtf8String(FLAG_expose_debug_as); |
| 2911 uint32_t index; | 2907 uint32_t index; |
| 2912 if (debug_string->AsArrayIndex(&index)) return true; | 2908 if (debug_string->AsArrayIndex(&index)) return true; |
| 2913 Handle<Object> global_proxy(debug_context->global_proxy(), isolate); | 2909 Handle<Object> global_proxy(debug_context->global_proxy(), isolate); |
| 2914 JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM); | 2910 JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM); |
| 2915 } | 2911 } |
| 2916 | 2912 |
| 2917 #if defined(V8_WASM) | |
| 2918 if (FLAG_expose_wasm) { | 2913 if (FLAG_expose_wasm) { |
| 2919 WasmJs::Install(isolate, global); | 2914 WasmJs::Install(isolate, global); |
| 2920 } | 2915 } |
| 2921 #endif | |
| 2922 | 2916 |
| 2923 return true; | 2917 return true; |
| 2924 } | 2918 } |
| 2925 | 2919 |
| 2926 | 2920 |
| 2927 static uint32_t Hash(RegisteredExtension* extension) { | 2921 static uint32_t Hash(RegisteredExtension* extension) { |
| 2928 return v8::internal::ComputePointerHash(extension); | 2922 return v8::internal::ComputePointerHash(extension); |
| 2929 } | 2923 } |
| 2930 | 2924 |
| 2931 | 2925 |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3411 } | 3405 } |
| 3412 | 3406 |
| 3413 | 3407 |
| 3414 // Called when the top-level V8 mutex is destroyed. | 3408 // Called when the top-level V8 mutex is destroyed. |
| 3415 void Bootstrapper::FreeThreadResources() { | 3409 void Bootstrapper::FreeThreadResources() { |
| 3416 DCHECK(!IsActive()); | 3410 DCHECK(!IsActive()); |
| 3417 } | 3411 } |
| 3418 | 3412 |
| 3419 } // namespace internal | 3413 } // namespace internal |
| 3420 } // namespace v8 | 3414 } // namespace v8 |
| OLD | NEW |