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

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

Issue 2382953004: Revert "Lazy deopt without code patching." (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « runtime/vm/stack_frame.h ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_ARM) 6 #if defined(TARGET_ARCH_ARM)
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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 __ Pop(R1); // Restore stacktrace. 529 __ Pop(R1); // Restore stacktrace.
530 __ Pop(R0); // Restore exception. 530 __ Pop(R0); // Restore exception.
531 } 531 }
532 __ LeaveStubFrame(); 532 __ LeaveStubFrame();
533 // Remove materialization arguments. 533 // Remove materialization arguments.
534 __ add(SP, SP, Operand(R2, ASR, kSmiTagSize)); 534 __ add(SP, SP, Operand(R2, ASR, kSmiTagSize));
535 __ Ret(); 535 __ Ret();
536 } 536 }
537 537
538 538
539 // LR: return address + call-instruction-size
539 // R0: result, must be preserved 540 // R0: result, must be preserved
540 void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) { 541 void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) {
542 // Correct return address to point just after the call that is being
543 // deoptimized.
544 __ AddImmediate(LR, -CallPattern::DeoptCallPatternLengthInBytes());
541 // Push zap value instead of CODE_REG for lazy deopt. 545 // Push zap value instead of CODE_REG for lazy deopt.
542 __ LoadImmediate(IP, 0xf1f1f1f1); 546 __ LoadImmediate(IP, 0xf1f1f1f1);
543 __ Push(IP); 547 __ Push(IP);
544 // Return address for "call" to deopt stub.
545 __ LoadImmediate(LR, 0xe1e1e1e1);
546 __ ldr(CODE_REG, Address(THR, Thread::lazy_deopt_from_return_stub_offset()));
547 GenerateDeoptimizationSequence(assembler, kLazyDeoptFromReturn); 548 GenerateDeoptimizationSequence(assembler, kLazyDeoptFromReturn);
548 } 549 }
549 550
550 551
552 // LR: return address + call-instruction-size
551 // R0: exception, must be preserved 553 // R0: exception, must be preserved
552 // R1: stacktrace, must be preserved 554 // R1: stacktrace, must be preserved
553 void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) { 555 void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) {
556 // Correct return address to point just after the call that is being
557 // deoptimized.
558 __ AddImmediate(LR, -CallPattern::DeoptCallPatternLengthInBytes());
554 // Push zap value instead of CODE_REG for lazy deopt. 559 // Push zap value instead of CODE_REG for lazy deopt.
555 __ LoadImmediate(IP, 0xf1f1f1f1); 560 __ LoadImmediate(IP, 0xf1f1f1f1);
556 __ Push(IP); 561 __ Push(IP);
557 // Return address for "call" to deopt stub.
558 __ LoadImmediate(LR, 0xe1e1e1e1);
559 __ ldr(CODE_REG, Address(THR, Thread::lazy_deopt_from_throw_stub_offset()));
560 GenerateDeoptimizationSequence(assembler, kLazyDeoptFromThrow); 562 GenerateDeoptimizationSequence(assembler, kLazyDeoptFromThrow);
561 } 563 }
562 564
563 565
564 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { 566 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) {
565 GenerateDeoptimizationSequence(assembler, kEagerDeopt); 567 GenerateDeoptimizationSequence(assembler, kEagerDeopt);
566 } 568 }
567 569
568 570
569 static void GenerateDispatcherCode(Assembler* assembler, 571 static void GenerateDispatcherCode(Assembler* assembler,
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 } 2256 }
2255 2257
2256 2258
2257 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2259 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2258 __ bkpt(0); 2260 __ bkpt(0);
2259 } 2261 }
2260 2262
2261 } // namespace dart 2263 } // namespace dart
2262 2264
2263 #endif // defined TARGET_ARCH_ARM 2265 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/stack_frame.h ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698