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

Unified Diff: test/cctest/compiler/test-run-wasm-machops.cc

Issue 2735103003: Merged: [wasm] Fix code specialization for empty memory buffer (Closed)
Patch Set: Created 3 years, 9 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/wasm/wasm-module.cc ('k') | test/cctest/test-run-wasm-relocation-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-wasm-machops.cc
diff --git a/test/cctest/compiler/test-run-wasm-machops.cc b/test/cctest/compiler/test-run-wasm-machops.cc
index 09dbdd8e024ef47c4e9abb6bb816cecea9cf6fee..cbf2b2a0a383c1776ef9847861c00c0c7293c055 100644
--- a/test/cctest/compiler/test-run-wasm-machops.cc
+++ b/test/cctest/compiler/test-run-wasm-machops.cc
@@ -27,13 +27,13 @@ static void UpdateMemoryReferences(Handle<Code> code, Address old_base,
RelocInfo::ModeMask(RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
RelocInfo::Mode mode = it.rinfo()->rmode();
- if (RelocInfo::IsWasmMemoryReference(mode) ||
- RelocInfo::IsWasmMemorySizeReference(mode)) {
- // Patch addresses with change in memory start address
- it.rinfo()->update_wasm_memory_reference(old_base, new_base, old_size,
- new_size);
- modified = true;
+ if (RelocInfo::IsWasmMemoryReference(mode)) {
+ it.rinfo()->update_wasm_memory_reference(old_base, new_base);
+ } else {
+ DCHECK(RelocInfo::IsWasmMemorySizeReference(mode));
+ it.rinfo()->update_wasm_memory_size(old_size, new_size);
}
+ modified = true;
}
if (modified) {
Assembler::FlushICache(isolate, code->instruction_start(),
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/cctest/test-run-wasm-relocation-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698