Index: src/assembler.h |
diff --git a/src/assembler.h b/src/assembler.h |
index 29a64d73cb5f86459b115bbaae7bf751cd8106e1..a5be37eb29914c22af154e55c86818426c388ae4 100644 |
--- a/src/assembler.h |
+++ b/src/assembler.h |
@@ -395,6 +395,7 @@ class RelocInfo { |
WASM_MEMORY_REFERENCE, |
WASM_GLOBAL_REFERENCE, |
WASM_MEMORY_SIZE_REFERENCE, |
+ WASM_FUNCTION_TABLE_SIZE_REFERENCE, |
CELL, |
// Everything after runtime_entry (inclusive) is not GC'ed. |
@@ -437,7 +438,7 @@ class RelocInfo { |
FIRST_REAL_RELOC_MODE = CODE_TARGET, |
LAST_REAL_RELOC_MODE = VENEER_POOL, |
LAST_CODE_ENUM = DEBUGGER_STATEMENT, |
- LAST_GCED_ENUM = WASM_MEMORY_SIZE_REFERENCE, |
+ LAST_GCED_ENUM = WASM_FUNCTION_TABLE_SIZE_REFERENCE, |
FIRST_SHAREABLE_RELOC_MODE = CELL, |
}; |
@@ -530,6 +531,22 @@ class RelocInfo { |
static inline bool IsWasmGlobalReference(Mode mode) { |
return mode == WASM_GLOBAL_REFERENCE; |
} |
+ static inline bool IsWasmFunctionTableSizeReference(Mode mode) { |
+ return mode == WASM_FUNCTION_TABLE_SIZE_REFERENCE; |
+ } |
+ static inline bool IsWasmReference(Mode mode) { |
+ return mode == WASM_MEMORY_REFERENCE || mode == WASM_GLOBAL_REFERENCE || |
+ mode == WASM_MEMORY_SIZE_REFERENCE || |
+ mode == WASM_FUNCTION_TABLE_SIZE_REFERENCE; |
+ } |
+ static inline bool IsWasmSizeReference(Mode mode) { |
+ return mode == WASM_MEMORY_SIZE_REFERENCE || |
+ mode == WASM_FUNCTION_TABLE_SIZE_REFERENCE; |
+ } |
+ static inline bool IsWasmPtrReference(Mode mode) { |
+ return mode == WASM_MEMORY_REFERENCE || mode == WASM_GLOBAL_REFERENCE; |
+ } |
+ |
static inline int ModeMask(Mode mode) { return 1 << mode; } |
// Accessors |
@@ -558,6 +575,7 @@ class RelocInfo { |
Address wasm_memory_reference(); |
Address wasm_global_reference(); |
+ uint32_t wasm_function_table_size_reference(); |
uint32_t wasm_memory_size_reference(); |
void update_wasm_memory_reference( |
Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, |
@@ -565,6 +583,9 @@ class RelocInfo { |
void update_wasm_global_reference( |
Address old_base, Address new_base, |
ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED); |
+ void update_wasm_function_table_size_reference( |
+ uint32_t old_base, uint32_t new_base, |
+ ICacheFlushMode icache_flush_mode = FLUSH_ICACHE_IF_NEEDED); |
void set_target_address( |
Address target, |
WriteBarrierMode write_barrier_mode = UPDATE_WRITE_BARRIER, |
@@ -673,8 +694,7 @@ class RelocInfo { |
private: |
void unchecked_update_wasm_memory_reference(Address address, |
ICacheFlushMode flush_mode); |
- void unchecked_update_wasm_memory_size(uint32_t size, |
- ICacheFlushMode flush_mode); |
+ void unchecked_update_wasm_size(uint32_t size, ICacheFlushMode flush_mode); |
Isolate* isolate_; |
// On ARM, note that pc_ is the address of the constant pool entry |