Commit 201a40d2 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] Annotate some more {Code} mutation sites.

R=clemensh@chromium.org
BUG=v8:6792

Change-Id: Ida4a0c063232a01c9526d478530fc9adf1e6ee24
Reviewed-on: https://chromium-review.googlesource.com/756740
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49181}
parent 55062ced
......@@ -6912,6 +6912,8 @@ TEST(Regression6640) {
for (RelocIterator it(*code,
1 << RelocInfo::WASM_FUNCTION_TABLE_SIZE_REFERENCE);
!it.done(); it.next()) {
// TODO(6792): No longer needed once WebAssembly code is off heap.
CodeSpaceMemoryModificationScope modification_scope(code->GetHeap());
it.rinfo()->update_wasm_function_table_size_reference(
code->GetIsolate(), old_value, new_value, FLUSH_ICACHE_IF_NEEDED);
}
......
......@@ -24,6 +24,8 @@ static void UpdateFunctionTableSizeReferences(Handle<Code> code,
uint32_t old_size,
uint32_t new_size) {
Isolate* isolate = CcTest::i_isolate();
// TODO(6792): No longer needed once WebAssembly code is off heap.
CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
bool modified = false;
int mode_mask =
RelocInfo::ModeMask(RelocInfo::WASM_FUNCTION_TABLE_SIZE_REFERENCE);
......
......@@ -55,6 +55,8 @@ TEST(WasmRelocationArmContextReference) {
// Relocating references by offset
int mode_mask = (1 << RelocInfo::WASM_CONTEXT_REFERENCE);
for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
// TODO(6792): No longer needed once WebAssembly code is off heap.
CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
DCHECK(RelocInfo::IsWasmContextReference(it.rinfo()->rmode()));
it.rinfo()->set_wasm_context_reference(
isolate, it.rinfo()->wasm_context_reference() + offset,
......
......@@ -60,6 +60,8 @@ TEST(WasmRelocationArm64ContextReference) {
// Relocating reference by offset
int mode_mask = (1 << RelocInfo::WASM_CONTEXT_REFERENCE);
for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
// TODO(6792): No longer needed once WebAssembly code is off heap.
CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
DCHECK(RelocInfo::IsWasmContextReference(it.rinfo()->rmode()));
it.rinfo()->set_wasm_context_reference(
isolate, it.rinfo()->wasm_context_reference() + offset,
......
......@@ -64,6 +64,8 @@ TEST(WasmRelocationIa32ContextReference) {
// Relocating references by offset
int mode_mask = (1 << RelocInfo::WASM_CONTEXT_REFERENCE);
for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
// TODO(6792): No longer needed once WebAssembly code is off heap.
CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
DCHECK(RelocInfo::IsWasmContextReference(it.rinfo()->rmode()));
it.rinfo()->set_wasm_context_reference(
isolate, it.rinfo()->wasm_context_reference() + offset,
......
......@@ -60,6 +60,8 @@ TEST(WasmRelocationX64ContextReference) {
// Relocating references by offset
int mode_mask = (1 << RelocInfo::WASM_CONTEXT_REFERENCE);
for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
// TODO(6792): No longer needed once WebAssembly code is off heap.
CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
DCHECK(RelocInfo::IsWasmContextReference(it.rinfo()->rmode()));
it.rinfo()->set_wasm_context_reference(
isolate, it.rinfo()->wasm_context_reference() + offset,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment