Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Unified Diff: src/assembler.h

Issue 2627543003: [wasm] Prerequisites for WebAssembly Table.Grow (Closed)
Patch Set: Rename update function Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698