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

Unified Diff: test/cctest/compiler/test-codegen-deopt.cc

Issue 504493002: Fix deoptimization address patching in Turbofan to use safepoints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Compilation fix. Created 6 years, 4 months 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 | « src/x87/lithium-codegen-x87.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-codegen-deopt.cc
diff --git a/test/cctest/compiler/test-codegen-deopt.cc b/test/cctest/compiler/test-codegen-deopt.cc
index 1e30e938b9f1ad99bbe30224e82ab444dfed6c04..fd2463e664ceee1e2f1751105e339fcb001feff6 100644
--- a/test/cctest/compiler/test-codegen-deopt.cc
+++ b/test/cctest/compiler/test-codegen-deopt.cc
@@ -201,11 +201,12 @@ TEST(TurboTrivialDeoptCodegen) {
Label* cont_label = t.code->GetLabel(t.cont_block);
Label* deopt_label = t.code->GetLabel(t.deopt_block);
- // Check the patch table. It should patch the continuation address to the
- // deoptimization block address.
- CHECK_EQ(1, data->ReturnAddressPatchCount());
- CHECK_EQ(cont_label->pos(), data->ReturnAddressPc(0)->value());
- CHECK_EQ(deopt_label->pos(), data->PatchedAddressPc(0)->value());
+ // Check the safepoint - it should contain an entry for the call
+ // with the right deoptimization address.
+ SafepointEntry entry = t.result_code->GetSafepointEntry(
+ t.result_code->instruction_start() + cont_label->pos());
+ CHECK(entry.is_valid());
+ CHECK_EQ(deopt_label->pos(), entry.deoptimization_pc());
// Check that we deoptimize to the right AST id.
CHECK_EQ(1, data->DeoptCount());
« no previous file with comments | « src/x87/lithium-codegen-x87.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698