OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef V8_WASM_JS_H_ | 5 #ifndef V8_WASM_JS_H_ |
6 #define V8_WASM_JS_H_ | 6 #define V8_WASM_JS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/hashmap.h" | 9 #include "src/base/hashmap.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 // Exposes a WASM API to JavaScript through the V8 API. | 13 // Exposes a WASM API to JavaScript through the V8 API. |
14 class WasmJs { | 14 class WasmJs { |
15 public: | 15 public: |
16 static void Install(Isolate* isolate, Handle<JSGlobalObject> global_object); | 16 static void Install(Isolate* isolate, Handle<JSGlobalObject> global_object); |
17 | 17 |
18 static void InstallWasmModuleSymbolIfNeeded(Isolate* isolate, | 18 static void InstallWasmModuleSymbolIfNeeded(Isolate* isolate, |
19 Handle<JSGlobalObject> global, | 19 Handle<JSGlobalObject> global, |
20 Handle<Context> context); | 20 Handle<Context> context); |
21 | 21 |
22 static void InstallWasmMapsIfNeeded(Isolate* isolate, | 22 static void InstallWasmMapsIfNeeded(Isolate* isolate, |
23 Handle<Context> context); | 23 Handle<Context> context); |
24 static void InstallWasmConstructors(Isolate* isolate, | 24 static void InstallWasmConstructors(Isolate* isolate, |
25 Handle<JSGlobalObject> global, | 25 Handle<JSGlobalObject> global, |
26 Handle<Context> context); | 26 Handle<Context> context); |
27 | |
28 static Handle<JSObject> CreateWasmMemoryObject(Isolate* isolate, | |
29 Handle<JSArrayBuffer> buffer, | |
30 bool has_maximum, int maximum); | |
31 }; | 27 }; |
32 | 28 |
33 } // namespace internal | 29 } // namespace internal |
34 } // namespace v8 | 30 } // namespace v8 |
35 #endif | 31 #endif |
OLD | NEW |