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

Side by Side Diff: runtime/vm/stub_code_arm64.cc

Issue 1052563003: VM: Add infrastructure to support deferred generation of unoptimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // Restore result into R1. 532 // Restore result into R1.
533 __ LoadFromOffset(R1, FP, kFirstLocalSlotFromFp * kWordSize, kNoPP); 533 __ LoadFromOffset(R1, FP, kFirstLocalSlotFromFp * kWordSize, kNoPP);
534 } 534 }
535 // Code above cannot cause GC. 535 // Code above cannot cause GC.
536 // There is a Dart Frame on the stack. We must restore PP and leave frame. 536 // There is a Dart Frame on the stack. We must restore PP and leave frame.
537 __ LeaveDartFrame(); 537 __ LeaveDartFrame();
538 538
539 // Frame is fully rewritten at this point and it is safe to perform a GC. 539 // Frame is fully rewritten at this point and it is safe to perform a GC.
540 // Materialize any objects that were deferred by FillFrame because they 540 // Materialize any objects that were deferred by FillFrame because they
541 // require allocation. 541 // require allocation.
542 __ EnterStubFrame(); 542 // Enter stub frame with loading PP. The caller's PP is not materialized yet.
543 __ EnterStubFrame(true);
543 if (preserve_result) { 544 if (preserve_result) {
544 __ Push(ZR); // Workaround for dropped stack slot during GC. 545 __ Push(ZR); // Workaround for dropped stack slot during GC.
545 __ Push(R1); // Preserve result, it will be GC-d here. 546 __ Push(R1); // Preserve result, it will be GC-d here.
546 } 547 }
547 __ Push(ZR); // Space for the result. 548 __ Push(ZR); // Space for the result.
548 __ CallRuntime(kDeoptimizeMaterializeRuntimeEntry, 0); 549 __ CallRuntime(kDeoptimizeMaterializeRuntimeEntry, 0);
549 // Result tells stub how many bytes to remove from the expression stack 550 // Result tells stub how many bytes to remove from the expression stack
550 // of the bottom-most frame. They were used as materialization arguments. 551 // of the bottom-most frame. They were used as materialization arguments.
551 __ Pop(R1); 552 __ Pop(R1);
552 __ SmiUntag(R1); 553 __ SmiUntag(R1);
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 const Register right = R0; 2102 const Register right = R0;
2102 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP); 2103 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP);
2103 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP); 2104 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP);
2104 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 2105 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
2105 __ ret(); 2106 __ ret();
2106 } 2107 }
2107 2108
2108 } // namespace dart 2109 } // namespace dart
2109 2110
2110 #endif // defined TARGET_ARCH_ARM64 2111 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698