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

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

Issue 10952002: Reapply "Deoptimization support in inlined code." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_x64.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/assembler_macros.h" 9 #include "vm/assembler_macros.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
11 #include "vm/flow_graph_compiler.h" 11 #include "vm/flow_graph_compiler.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 __ movl(Address(ESP, 0), EDX); 544 __ movl(Address(ESP, 0), EDX);
545 545
546 __ EnterFrame(0); 546 __ EnterFrame(0);
547 __ movl(ECX, ESP); // Get last FP address. 547 __ movl(ECX, ESP); // Get last FP address.
548 if (preserve_eax) { 548 if (preserve_eax) {
549 __ pushl(EBX); // Preserve result. 549 __ pushl(EBX); // Preserve result.
550 } 550 }
551 __ ReserveAlignedFrameSpace(1 * kWordSize); 551 __ ReserveAlignedFrameSpace(1 * kWordSize);
552 __ movl(Address(ESP, 0), ECX); 552 __ movl(Address(ESP, 0), ECX);
553 __ CallRuntime(kDeoptimizeFillFrameRuntimeEntry); 553 __ CallRuntime(kDeoptimizeFillFrameRuntimeEntry);
554 554 // Result (EAX) is our FP.
555 if (preserve_eax) { 555 if (preserve_eax) {
556 // Restore result into EAX. 556 // Restore result into EBX.
557 __ movl(EAX, Address(EBP, -1 * kWordSize)); 557 __ movl(EBX, Address(EBP, -1 * kWordSize));
558 } 558 }
559 // Code above cannot cause GC. 559 // Code above cannot cause GC.
560 __ LeaveFrame(); 560 __ LeaveFrame();
561 __ movl(EBP, EAX);
561 562
562 // Frame is fully rewritten at this point and it is safe to perform a GC. 563 // Frame is fully rewritten at this point and it is safe to perform a GC.
563 // Materialize any objects that were deferred by FillFrame because they 564 // Materialize any objects that were deferred by FillFrame because they
564 // require allocation. 565 // require allocation.
565 __ EnterFrame(0); 566 __ EnterFrame(0);
566 if (preserve_eax) { 567 if (preserve_eax) {
567 __ pushl(EAX); // Preserve result, it will be GC-d here. 568 __ pushl(EBX); // Preserve result, it will be GC-d here.
568 } 569 }
569 __ CallRuntime(kDeoptimizeMaterializeDoublesRuntimeEntry); 570 __ CallRuntime(kDeoptimizeMaterializeDoublesRuntimeEntry);
570 if (preserve_eax) { 571 if (preserve_eax) {
571 __ popl(EAX); // Restore result. 572 __ popl(EAX); // Restore result.
572 } 573 }
573 __ LeaveFrame(); 574 __ LeaveFrame();
574 __ ret(); 575 __ ret();
575 } 576 }
576 577
577 // TOS: return address + call-instruction-size (5 bytes). 578 // TOS: return address + call-instruction-size (5 bytes).
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 __ movl(EAX, Address(ESP, 4 * kWordSize)); // Load error object. 1960 __ movl(EAX, Address(ESP, 4 * kWordSize)); // Load error object.
1960 __ movl(EBP, Address(ESP, 3 * kWordSize)); // Load target frame_pointer. 1961 __ movl(EBP, Address(ESP, 3 * kWordSize)); // Load target frame_pointer.
1961 __ movl(EBX, Address(ESP, 1 * kWordSize)); // Load target PC into EBX. 1962 __ movl(EBX, Address(ESP, 1 * kWordSize)); // Load target PC into EBX.
1962 __ movl(ESP, Address(ESP, 2 * kWordSize)); // Load target stack_pointer. 1963 __ movl(ESP, Address(ESP, 2 * kWordSize)); // Load target stack_pointer.
1963 __ jmp(EBX); // Jump to the exception handler code. 1964 __ jmp(EBX); // Jump to the exception handler code.
1964 } 1965 }
1965 1966
1966 } // namespace dart 1967 } // namespace dart
1967 1968
1968 #endif // defined TARGET_ARCH_IA32 1969 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698