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/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
11 #include "src/compiler.h" | 11 #include "src/compiler.h" |
12 #include "src/extensions/externalize-string-extension.h" | 12 #include "src/extensions/externalize-string-extension.h" |
13 #include "src/extensions/free-buffer-extension.h" | 13 #include "src/extensions/free-buffer-extension.h" |
14 #include "src/extensions/gc-extension.h" | 14 #include "src/extensions/gc-extension.h" |
15 #include "src/extensions/ignition-statistics-extension.h" | 15 #include "src/extensions/ignition-statistics-extension.h" |
16 #include "src/extensions/statistics-extension.h" | 16 #include "src/extensions/statistics-extension.h" |
17 #include "src/extensions/trigger-failure-extension.h" | 17 #include "src/extensions/trigger-failure-extension.h" |
| 18 #include "src/ffi/ffi-compiler.h" |
18 #include "src/heap/heap.h" | 19 #include "src/heap/heap.h" |
19 #include "src/isolate-inl.h" | 20 #include "src/isolate-inl.h" |
20 #include "src/snapshot/natives.h" | 21 #include "src/snapshot/natives.h" |
21 #include "src/snapshot/snapshot.h" | 22 #include "src/snapshot/snapshot.h" |
22 #include "src/wasm/wasm-js.h" | 23 #include "src/wasm/wasm-js.h" |
23 | 24 |
24 #if V8_I18N_SUPPORT | 25 #if V8_I18N_SUPPORT |
25 #include "src/i18n.h" | 26 #include "src/i18n.h" |
26 #endif // V8_I18N_SUPPORT | 27 #endif // V8_I18N_SUPPORT |
27 | 28 |
(...skipping 4161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4189 Handle<JSObject> Error = isolate->error_function(); | 4190 Handle<JSObject> Error = isolate->error_function(); |
4190 Handle<String> name = | 4191 Handle<String> name = |
4191 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("stackTraceLimit")); | 4192 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("stackTraceLimit")); |
4192 Handle<Smi> stack_trace_limit(Smi::FromInt(FLAG_stack_trace_limit), isolate); | 4193 Handle<Smi> stack_trace_limit(Smi::FromInt(FLAG_stack_trace_limit), isolate); |
4193 JSObject::AddProperty(Error, name, stack_trace_limit, NONE); | 4194 JSObject::AddProperty(Error, name, stack_trace_limit, NONE); |
4194 | 4195 |
4195 if (FLAG_expose_wasm || FLAG_validate_asm) { | 4196 if (FLAG_expose_wasm || FLAG_validate_asm) { |
4196 WasmJs::Install(isolate); | 4197 WasmJs::Install(isolate); |
4197 } | 4198 } |
4198 | 4199 |
| 4200 InstallFFIMap(isolate); |
| 4201 |
4199 // Expose the debug global object in global if a name for it is specified. | 4202 // Expose the debug global object in global if a name for it is specified. |
4200 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { | 4203 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { |
4201 // If loading fails we just bail out without installing the | 4204 // If loading fails we just bail out without installing the |
4202 // debugger but without tanking the whole context. | 4205 // debugger but without tanking the whole context. |
4203 Debug* debug = isolate->debug(); | 4206 Debug* debug = isolate->debug(); |
4204 if (!debug->Load()) return true; | 4207 if (!debug->Load()) return true; |
4205 Handle<Context> debug_context = debug->debug_context(); | 4208 Handle<Context> debug_context = debug->debug_context(); |
4206 // Set the security token for the debugger context to the same as | 4209 // Set the security token for the debugger context to the same as |
4207 // the shell native context to allow calling between these (otherwise | 4210 // the shell native context to allow calling between these (otherwise |
4208 // exposing debug global object doesn't make much sense). | 4211 // exposing debug global object doesn't make much sense). |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4798 } | 4801 } |
4799 | 4802 |
4800 | 4803 |
4801 // Called when the top-level V8 mutex is destroyed. | 4804 // Called when the top-level V8 mutex is destroyed. |
4802 void Bootstrapper::FreeThreadResources() { | 4805 void Bootstrapper::FreeThreadResources() { |
4803 DCHECK(!IsActive()); | 4806 DCHECK(!IsActive()); |
4804 } | 4807 } |
4805 | 4808 |
4806 } // namespace internal | 4809 } // namespace internal |
4807 } // namespace v8 | 4810 } // namespace v8 |
OLD | NEW |