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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/api.h" | 10 #include "src/api.h" |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 bool WasmIsAsmJs(Object* wasm, Isolate* isolate); | 508 bool WasmIsAsmJs(Object* wasm, Isolate* isolate); |
509 | 509 |
510 // Get the script for the asm.js origin of the wasm module. | 510 // Get the script for the asm.js origin of the wasm module. |
511 Handle<Script> GetAsmWasmScript(Handle<JSObject> wasm); | 511 Handle<Script> GetAsmWasmScript(Handle<JSObject> wasm); |
512 | 512 |
513 // Get the asm.js source position for the given byte offset in the given | 513 // Get the asm.js source position for the given byte offset in the given |
514 // function. | 514 // function. |
515 int GetAsmWasmSourcePosition(Handle<JSObject> wasm, int func_index, | 515 int GetAsmWasmSourcePosition(Handle<JSObject> wasm, int func_index, |
516 int byte_offset); | 516 int byte_offset); |
517 | 517 |
| 518 // Update memory references of code objects associated with the module |
| 519 bool UpdateWasmModuleMemory(Handle<JSObject> object, Address old_start, |
| 520 Address new_start, uint32_t old_size, |
| 521 uint32_t new_size); |
| 522 |
518 // Constructs a single function table as a FixedArray of double size, | 523 // Constructs a single function table as a FixedArray of double size, |
519 // populating it with function signature indices and function indices. | 524 // populating it with function signature indices and function indices. |
520 Handle<FixedArray> BuildFunctionTable(Isolate* isolate, uint32_t index, | 525 Handle<FixedArray> BuildFunctionTable(Isolate* isolate, uint32_t index, |
521 const WasmModule* module); | 526 const WasmModule* module); |
522 | 527 |
523 // Populates a function table by replacing function indices with handles to | 528 // Populates a function table by replacing function indices with handles to |
524 // the compiled code. | 529 // the compiled code. |
525 void PopulateFunctionTable(Handle<FixedArray> table, uint32_t table_size, | 530 void PopulateFunctionTable(Handle<FixedArray> table, uint32_t table_size, |
526 const std::vector<Handle<Code>>* code_table); | 531 const std::vector<Handle<Code>>* code_table); |
527 | 532 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 int instance_count); | 566 int instance_count); |
562 void ValidateModuleState(Isolate* isolate, Handle<JSObject> module_obj); | 567 void ValidateModuleState(Isolate* isolate, Handle<JSObject> module_obj); |
563 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance); | 568 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance); |
564 | 569 |
565 } // namespace testing | 570 } // namespace testing |
566 } // namespace wasm | 571 } // namespace wasm |
567 } // namespace internal | 572 } // namespace internal |
568 } // namespace v8 | 573 } // namespace v8 |
569 | 574 |
570 #endif // V8_WASM_MODULE_H_ | 575 #endif // V8_WASM_MODULE_H_ |
OLD | NEW |