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

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

Issue 2392613002: Reapply "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/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.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_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 454 }
455 __ LeaveFrame(); 455 __ LeaveFrame();
456 456
457 __ popl(ECX); // Pop return address. 457 __ popl(ECX); // Pop return address.
458 __ addl(ESP, EBX); // Remove materialization arguments. 458 __ addl(ESP, EBX); // Remove materialization arguments.
459 __ pushl(ECX); // Push return address. 459 __ pushl(ECX); // Push return address.
460 __ ret(); 460 __ ret();
461 } 461 }
462 462
463 463
464 // TOS: return address + call-instruction-size (5 bytes).
465 // EAX: result, must be preserved 464 // EAX: result, must be preserved
466 void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) { 465 void StubCode::GenerateDeoptimizeLazyFromReturnStub(Assembler* assembler) {
467 // Correct return address to point just after the call that is being 466 // Return address for "call" to deopt stub.
468 // deoptimized. 467 __ pushl(Immediate(0xe1e1e1e1));
469 __ popl(EBX);
470 __ subl(EBX, Immediate(CallPattern::pattern_length_in_bytes()));
471 __ pushl(EBX);
472 GenerateDeoptimizationSequence(assembler, kLazyDeoptFromReturn); 468 GenerateDeoptimizationSequence(assembler, kLazyDeoptFromReturn);
473 } 469 }
474 470
475 471
476 // TOS: return address + call-instruction-size (5 bytes).
477 // EAX: exception, must be preserved 472 // EAX: exception, must be preserved
478 // EDX: stacktrace, must be preserved 473 // EDX: stacktrace, must be preserved
479 void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) { 474 void StubCode::GenerateDeoptimizeLazyFromThrowStub(Assembler* assembler) {
480 // Correct return address to point just after the call that is being 475 // Return address for "call" to deopt stub.
481 // deoptimized. 476 __ pushl(Immediate(0xe1e1e1e1));
482 __ popl(EBX);
483 __ subl(EBX, Immediate(CallPattern::pattern_length_in_bytes()));
484 __ pushl(EBX);
485 GenerateDeoptimizationSequence(assembler, kLazyDeoptFromThrow); 477 GenerateDeoptimizationSequence(assembler, kLazyDeoptFromThrow);
486 } 478 }
487 479
488 480
489 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { 481 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) {
490 GenerateDeoptimizationSequence(assembler, kEagerDeopt); 482 GenerateDeoptimizationSequence(assembler, kEagerDeopt);
491 } 483 }
492 484
493 485
494 static void GenerateDispatcherCode(Assembler* assembler, 486 static void GenerateDispatcherCode(Assembler* assembler,
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
2072 } 2064 }
2073 2065
2074 2066
2075 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2067 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2076 __ int3(); 2068 __ int3();
2077 } 2069 }
2078 2070
2079 } // namespace dart 2071 } // namespace dart
2080 2072
2081 #endif // defined TARGET_ARCH_IA32 2073 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698