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

Unified Diff: runtime/vm/instructions_x64_test.cc

Issue 63093003: Fix for issue 14790 - Crash when using dartium devtools (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object_x64_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_x64_test.cc
===================================================================
--- runtime/vm/instructions_x64_test.cc (revision 30084)
+++ runtime/vm/instructions_x64_test.cc (working copy)
@@ -27,21 +27,29 @@
}
+static intptr_t prologue_code_size = -1;
+
+
ASSEMBLER_TEST_GENERATE(Jump, assembler) {
- __ EnterDartFrame(0); // 20 bytes
+ ASSERT(assembler->CodeSize() == 0);
+ __ pushq(PP);
+ __ LoadPoolPointer(PP);
+ prologue_code_size = assembler->CodeSize();
__ JmpPatchable(&StubCode::InstanceFunctionLookupLabel(), PP);
__ JmpPatchable(&StubCode::AllocateArrayLabel(), PP);
- __ LeaveFrameWithPP();
+ __ popq(PP);
__ ret();
}
ASSEMBLER_TEST_RUN(Jump, test) {
- JumpPattern jump1(test->entry() + 20, test->code());
+ ASSERT(prologue_code_size != -1);
+ JumpPattern jump1(test->entry() + prologue_code_size, test->code());
jump1.IsValid();
EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
jump1.TargetAddress());
- JumpPattern jump2(test->entry() + jump1.pattern_length_in_bytes() + 20,
+ JumpPattern jump2((test->entry() +
+ jump1.pattern_length_in_bytes() + prologue_code_size),
test->code());
EXPECT_EQ(StubCode::AllocateArrayLabel().address(),
jump2.TargetAddress());
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698