[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}
This commit is contained in:
ahaas 2016-07-08 03:32:26 -07:00 committed by Commit bot
parent 55b89ad7e6
commit 4d631c8cd9

View File

@ -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 {