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

Unified Diff: runtime/vm/stub_code_x64.cc

Issue 14935005: Implement a variation of scalar replacement for non-escaping allocations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 7 years, 7 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 | « runtime/vm/stub_code_mips.cc ('k') | tests/language/allocation_sinking_vm_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_x64.cc
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index 1654efb2c9b8061ea0180ee87f9a6a5629d4a230..c150d034043c5eaeb449c8526859d9f2ef43958c 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -387,12 +387,20 @@ static void GenerateDeoptimizationSequence(Assembler* assembler,
if (preserve_rax) {
__ pushq(RBX); // Preserve result, it will be GC-d here.
}
- __ CallRuntime(kDeoptimizeMaterializeDoublesRuntimeEntry);
+ __ pushq(Immediate(Smi::RawValue(0))); // Space for the result.
+ __ CallRuntime(kDeoptimizeMaterializeRuntimeEntry);
+ // Result tells stub how many bytes to remove from the expression stack
+ // of the bottom-most frame. They were used as materialization arguments.
+ __ popq(RBX);
+ __ SmiUntag(RBX);
if (preserve_rax) {
__ popq(RAX); // Restore result.
}
__ LeaveFrame();
+ __ popq(RCX); // Pop return address.
+ __ addq(RSP, RBX); // Remove materialization arguments.
+ __ pushq(RCX); // Push return address.
__ ret();
}
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | tests/language/allocation_sinking_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698