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

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

Issue 8588002: Better tracing of deoptimization (added a reason id and printing of source). Fix a bug with exces... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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) 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/code_generator.h" 8 #include "vm/code_generator.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/ic_data.h" 10 #include "vm/ic_data.h"
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 __ popl(EAX); // Get result into EAX. 599 __ popl(EAX); // Get result into EAX.
600 600
601 // Remove the stub frame as we are about to return. 601 // Remove the stub frame as we are about to return.
602 __ LeaveFrame(); 602 __ LeaveFrame();
603 __ ret(); 603 __ ret();
604 } 604 }
605 605
606 606
607 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { 607 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) {
608 __ EnterFrame(0); 608 __ EnterFrame(0);
609 // EAX: deoptimization reason id.
609 // Stack at this point: 610 // Stack at this point:
610 // TOS + 0: Saved EBP of function frame that will be deoptimized. <== EBP 611 // TOS + 0: Saved EBP of function frame that will be deoptimized. <== EBP
611 // TOS + 1: Deoptimization point (return address), will be patched. 612 // TOS + 1: Deoptimization point (return address), will be patched.
612 // TOS + 2: top-of-stack at deoptimization point (all arguments on stack). 613 // TOS + 2: top-of-stack at deoptimization point (all arguments on stack).
614 __ pushl(EAX);
613 __ CallRuntimeFromStub(kDeoptimizeRuntimeEntry); 615 __ CallRuntimeFromStub(kDeoptimizeRuntimeEntry);
616 __ popl(EAX);
614 __ LeaveFrame(); 617 __ LeaveFrame();
615 __ ret(); 618 __ ret();
616 } 619 }
617 620
618 621
619 // Called for inline allocation of arrays. 622 // Called for inline allocation of arrays.
620 // Input parameters: 623 // Input parameters:
621 // EDX : Array length as Smi. 624 // EDX : Array length as Smi.
622 // ECX : array element type (either NULL or an instantiated type). 625 // ECX : array element type (either NULL or an instantiated type).
623 // Uses EAX, EBX, ECX, EDI as temporary registers. 626 // Uses EAX, EBX, ECX, EDI as temporary registers.
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 // EAX: Target function. 1518 // EAX: Target function.
1516 __ movl(EAX, FieldAddress(EAX, Function::code_offset())); 1519 __ movl(EAX, FieldAddress(EAX, Function::code_offset()));
1517 __ movl(EAX, FieldAddress(EAX, Code::instructions_offset())); 1520 __ movl(EAX, FieldAddress(EAX, Code::instructions_offset()));
1518 __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); 1521 __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
1519 __ jmp(EAX); 1522 __ jmp(EAX);
1520 } 1523 }
1521 1524
1522 } // namespace dart 1525 } // namespace dart
1523 1526
1524 #endif // defined TARGET_ARCH_IA32 1527 #endif // defined TARGET_ARCH_IA32
OLDNEW
« runtime/vm/opt_code_generator_ia32.cc ('K') | « runtime/vm/opt_code_generator_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698