Commit 4d631c8c authored by ahaas's avatar ahaas Committed by Commit bot

[x64] Compare handles instead of code targets in emit_code_target.

This CL is on the way to extend parallel compilation of wasm modules to code generation. With parallel compilation it is not allowed to dereference handles during code generation. However, the is_identical_to check dereferences handles. In this CL we therefore replace the call to is_identical_to with a handle comparison.

Review-Url: https://codereview.chromium.org/2109143002
Cr-Commit-Position: refs/heads/master@{#37607}
parent 55b89ad7
......@@ -65,7 +65,7 @@ void Assembler::emit_code_target(Handle<Code> target,
RecordRelocInfo(rmode);
}
int current = code_targets_.length();
if (current > 0 && code_targets_.last().is_identical_to(target)) {
if (current > 0 && code_targets_.last().address() == target.address()) {
// Optimization if we keep jumping to the same code target.
emitl(current - 1);
} else {
......
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