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

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

Issue 15743019: Consolidate debug stubs (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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
« runtime/vm/stub_code_ia32.cc ('K') | « runtime/vm/stub_code_mips.cc ('k') | no next file » | 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_X64) 6 #if defined(TARGET_ARCH_X64)
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 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 } 1678 }
1679 1679
1680 1680
1681 // Megamorphic call is currently implemented as IC call but through a stub 1681 // Megamorphic call is currently implemented as IC call but through a stub
1682 // that does not check/count function invocations. 1682 // that does not check/count function invocations.
1683 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) { 1683 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) {
1684 GenerateNArgsCheckInlineCacheStub(assembler, 1); 1684 GenerateNArgsCheckInlineCacheStub(assembler, 1);
1685 } 1685 }
1686 1686
1687 1687
1688 // RBX: ICData. 1688 // RBX, R10: May contain arguments to runtime stub.
1689 // TOS(0): return address (Dart code). 1689 // TOS(0): return address (Dart code).
1690 void StubCode::GenerateBreakpointEqNullStub(Assembler* assembler) { 1690 void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) {
1691 __ EnterStubFrame(); 1691 __ EnterStubFrame();
1692 __ pushq(RBX); // Preserve ICData. 1692 // Preserve runtime args.
1693 __ CallRuntime(kBreakpointClosureHandlerRuntimeEntry); 1693 __ pushq(RBX);
1694 __ popq(RBX); // Restore arguments descriptor. 1694 __ pushq(R10);
1695 // Room for result. Debugger stub returns address of the
1696 // unpatched runtime stub.
1697 __ pushq(Immediate(0));
siva 2013/05/23 01:11:26 Ditto comment about pushq(raw_null);
hausner 2013/05/23 18:32:12 Done.
1698 __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry);
1699 __ popq(RAX); // Address of original.
1700 __ popq(R10); // Restore arguments.
1701 __ popq(RBX);
1695 __ LeaveFrame(); 1702 __ LeaveFrame();
1696 __ jmp(&StubCode::EqualityWithNullArgLabel()); 1703 __ jmp(RAX); // Jump to original stub.
1697 }
1698
1699
1700 // R10: Arguments descriptor array.
1701 // TOS(0): return address (Dart code).
1702 void StubCode::GenerateBreakpointClosureStub(Assembler* assembler) {
1703 __ EnterStubFrame();
1704 __ pushq(R10); // Preserve arguments descriptor.
1705 __ CallRuntime(kBreakpointClosureHandlerRuntimeEntry);
1706 __ popq(R10); // Restore arguments descriptor.
1707 __ LeaveFrame();
1708 __ jmp(&StubCode::CallClosureFunctionLabel());
1709 } 1704 }
1710 1705
1711 1706
1712 // R10: Arguments descriptor array. 1707 // R10: Arguments descriptor array.
1713 // TOS(0): return address (Dart code). 1708 // TOS(0): return address (Dart code).
1714 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) { 1709 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) {
1715 const Immediate& raw_null = 1710 const Immediate& raw_null =
1716 Immediate(reinterpret_cast<intptr_t>(Object::null())); 1711 Immediate(reinterpret_cast<intptr_t>(Object::null()));
1717 __ EnterStubFrame(); 1712 __ EnterStubFrame();
1718 __ pushq(R10); // Preserve arguments descriptor. 1713 __ pushq(R10); // Preserve arguments descriptor.
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2104 __ cmpq(left, right); 2099 __ cmpq(left, right);
2105 __ Bind(&done); 2100 __ Bind(&done);
2106 __ popq(right); 2101 __ popq(right);
2107 __ popq(left); 2102 __ popq(left);
2108 __ ret(); 2103 __ ret();
2109 } 2104 }
2110 2105
2111 } // namespace dart 2106 } // namespace dart
2112 2107
2113 #endif // defined TARGET_ARCH_X64 2108 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/stub_code_ia32.cc ('K') | « runtime/vm/stub_code_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698