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_MODULE_H_ | 5 #ifndef V8_WASM_MODULE_H_ |
6 #define V8_WASM_MODULE_H_ | 6 #define V8_WASM_MODULE_H_ |
7 | 7 |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/wasm/wasm-opcodes.h" | 10 #include "src/wasm/wasm-opcodes.h" |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 // If no debug info exists yet, it is created automatically. | 354 // If no debug info exists yet, it is created automatically. |
355 WasmDebugInfo* GetDebugInfo(JSObject* wasm); | 355 WasmDebugInfo* GetDebugInfo(JSObject* wasm); |
356 | 356 |
357 // Check whether the given object is a wasm object. | 357 // Check whether the given object is a wasm object. |
358 // This checks the number and type of internal fields, so it's not 100 percent | 358 // This checks the number and type of internal fields, so it's not 100 percent |
359 // secure. If it turns out that we need more complete checks, we could add a | 359 // secure. If it turns out that we need more complete checks, we could add a |
360 // special marker as internal field, which will definitely never occur anywhere | 360 // special marker as internal field, which will definitely never occur anywhere |
361 // else. | 361 // else. |
362 bool IsWasmObject(Object* object); | 362 bool IsWasmObject(Object* object); |
363 | 363 |
| 364 // Update memory references of code objects associated with the module |
| 365 bool UpdateWasmModuleMemory(JSObject* object, Address old_start, |
| 366 Address new_start, uint32_t old_size, |
| 367 uint32_t new_size); |
| 368 |
364 namespace testing { | 369 namespace testing { |
365 | 370 |
366 // Decode, verify, and run the function labeled "main" in the | 371 // Decode, verify, and run the function labeled "main" in the |
367 // given encoded module. The module should have no imports. | 372 // given encoded module. The module should have no imports. |
368 int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start, | 373 int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start, |
369 const byte* module_end, bool asm_js = false); | 374 const byte* module_end, bool asm_js = false); |
370 | 375 |
371 } // namespace testing | 376 } // namespace testing |
372 | |
373 } // namespace wasm | 377 } // namespace wasm |
374 } // namespace internal | 378 } // namespace internal |
375 } // namespace v8 | 379 } // namespace v8 |
376 | 380 |
377 #endif // V8_WASM_MODULE_H_ | 381 #endif // V8_WASM_MODULE_H_ |
OLD | NEW |