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

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

Issue 10825236: Replace deopt stubs location/register shuffling with using deopt-info. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/isolate.h ('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) 2011, 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"
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; i--) { 593 for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; i--) {
594 __ pushl(static_cast<Register>(i)); 594 __ pushl(static_cast<Register>(i));
595 } 595 }
596 __ movl(ECX, ESP); // Saved saved registers block. 596 __ movl(ECX, ESP); // Saved saved registers block.
597 __ ReserveAlignedFrameSpace(1 * kWordSize); 597 __ ReserveAlignedFrameSpace(1 * kWordSize);
598 __ SmiUntag(EAX); 598 __ SmiUntag(EAX);
599 __ movl(Address(ESP, 0), ECX); // Start of register block. 599 __ movl(Address(ESP, 0), ECX); // Start of register block.
600 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry); 600 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry);
601 // Result (EAX) is stack-size (FP - SP) in bytes, incl. the return address. 601 // Result (EAX) is stack-size (FP - SP) in bytes, incl. the return address.
602 __ LeaveFrame(); 602 __ LeaveFrame();
603 __ popl(EDX); // Discard return address. 603 __ popl(EDX); // Preserve return address.
604 __ movl(ESP, EBP); 604 __ movl(ESP, EBP);
605 __ subl(ESP, EAX); 605 __ subl(ESP, EAX);
606 __ movl(Address(ESP, 0), EDX);
606 607
607 __ EnterFrame(0); 608 __ EnterFrame(0);
608 __ movl(ECX, ESP); // Get last FP address. 609 __ movl(ECX, ESP); // Get last FP address.
609 __ ReserveAlignedFrameSpace(1 * kWordSize); 610 __ ReserveAlignedFrameSpace(1 * kWordSize);
610 __ movl(Address(ESP, 0), ECX); 611 __ movl(Address(ESP, 0), ECX);
611 __ CallRuntime(kDeoptimizeFillFrameRuntimeEntry); 612 __ CallRuntime(kDeoptimizeFillFrameRuntimeEntry);
612 __ LeaveFrame(); 613 __ LeaveFrame();
613 __ ret(); 614 __ ret();
614 } 615 }
615 616
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 __ movl(EAX, Address(ESP, 4 * kWordSize)); // Load error object. 1973 __ movl(EAX, Address(ESP, 4 * kWordSize)); // Load error object.
1973 __ movl(EBP, Address(ESP, 3 * kWordSize)); // Load target frame_pointer. 1974 __ movl(EBP, Address(ESP, 3 * kWordSize)); // Load target frame_pointer.
1974 __ movl(EBX, Address(ESP, 1 * kWordSize)); // Load target PC into EBX. 1975 __ movl(EBX, Address(ESP, 1 * kWordSize)); // Load target PC into EBX.
1975 __ movl(ESP, Address(ESP, 2 * kWordSize)); // Load target stack_pointer. 1976 __ movl(ESP, Address(ESP, 2 * kWordSize)); // Load target stack_pointer.
1976 __ jmp(EBX); // Jump to the exception handler code. 1977 __ jmp(EBX); // Jump to the exception handler code.
1977 } 1978 }
1978 1979
1979 } // namespace dart 1980 } // namespace dart
1980 1981
1981 #endif // defined TARGET_ARCH_IA32 1982 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698