summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/test-compiler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/test-compiler.cc')
-rw-r--r--deps/v8/test/cctest/test-compiler.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/deps/v8/test/cctest/test-compiler.cc b/deps/v8/test/cctest/test-compiler.cc
index 4c5f197bc6..72907b6e9a 100644
--- a/deps/v8/test/cctest/test-compiler.cc
+++ b/deps/v8/test/cctest/test-compiler.cc
@@ -375,10 +375,15 @@ static void CheckCodeForUnsafeLiteral(Handle<JSFunction> f) {
v8::internal::EmbeddedVector<char, 128> decode_buffer;
while (pc < end) {
- pc += d.InstructionDecode(decode_buffer, pc);
- CHECK(strstr(decode_buffer.start(), "mov eax,0x178c29c") == NULL);
- CHECK(strstr(decode_buffer.start(), "push 0x178c29c") == NULL);
- CHECK(strstr(decode_buffer.start(), "0x178c29c") == NULL);
+ int num_const = d.ConstantPoolSizeAt(pc);
+ if (num_const >= 0) {
+ pc += num_const * kPointerSize;
+ } else {
+ pc += d.InstructionDecode(decode_buffer, pc);
+ CHECK(strstr(decode_buffer.start(), "mov eax,0x178c29c") == NULL);
+ CHECK(strstr(decode_buffer.start(), "push 0x178c29c") == NULL);
+ CHECK(strstr(decode_buffer.start(), "0x178c29c") == NULL);
+ }
}
}
}