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

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

Issue 106053011: Make return statements single steppable (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.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" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 ASSERT(fp_sp_dist <= 0); 92 ASSERT(fp_sp_dist <= 0);
93 __ sub(R2, SP, ShifterOperand(FP)); 93 __ sub(R2, SP, ShifterOperand(FP));
94 __ CompareImmediate(R2, fp_sp_dist); 94 __ CompareImmediate(R2, fp_sp_dist);
95 __ b(&stack_ok, EQ); 95 __ b(&stack_ok, EQ);
96 __ bkpt(0); 96 __ bkpt(0);
97 __ Bind(&stack_ok); 97 __ Bind(&stack_ok);
98 } 98 }
99 #endif 99 #endif
100 __ LeaveDartFrame(); 100 __ LeaveDartFrame();
101 __ Ret(); 101 __ Ret();
102
103 // No need to generate NOP instructions so that the debugger can patch the
104 // return pattern (3 instructions) with a call to the debug stub (also 3
105 // instructions).
106 compiler->AddCurrentDescriptor(PcDescriptors::kReturn,
107 Isolate::kNoDeoptId,
108 token_pos());
109 } 102 }
110 103
111 104
112 static Condition NegateCondition(Condition condition) { 105 static Condition NegateCondition(Condition condition) {
113 switch (condition) { 106 switch (condition) {
114 case EQ: return NE; 107 case EQ: return NE;
115 case NE: return EQ; 108 case NE: return EQ;
116 case LT: return GE; 109 case LT: return GE;
117 case LE: return GT; 110 case LE: return GT;
118 case GT: return LE; 111 case GT: return LE;
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 721
729 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(bool opt) const { 722 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(bool opt) const {
730 const intptr_t kNumInputs = 1; 723 const intptr_t kNumInputs = 1;
731 // TODO(fschneider): Allow immediate operands for the char code. 724 // TODO(fschneider): Allow immediate operands for the char code.
732 return LocationSummary::Make(kNumInputs, 725 return LocationSummary::Make(kNumInputs,
733 Location::RequiresRegister(), 726 Location::RequiresRegister(),
734 LocationSummary::kNoCall); 727 LocationSummary::kNoCall);
735 } 728 }
736 729
737 730
731 LocationSummary* DebugStepCheckInstr::MakeLocationSummary(bool opt) const {
732 const intptr_t kNumInputs = 0;
733 const intptr_t kNumTemps = 0;
734 LocationSummary* locs =
735 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
736 return locs;
737 }
738
739
740 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
741 if (!compiler->is_optimizing()) {
742 const ExternalLabel label("debug_step_check",
743 StubCode::DebugStepCheckEntryPoint());
744 compiler->GenerateCall(token_pos(),
745 &label,
746 PcDescriptors::kReturn,
747 locs());
748 }
749 }
750
751
752 Instruction* DebugStepCheckInstr::Canonicalize(FlowGraph* flow_graph) {
753 if (compiler->is_optimizing()) {
754 return NULL;
755 }
756 }
757
758
738 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 759 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
739 Register char_code = locs()->in(0).reg(); 760 Register char_code = locs()->in(0).reg();
740 Register result = locs()->out().reg(); 761 Register result = locs()->out().reg();
741 __ LoadImmediate(result, 762 __ LoadImmediate(result,
742 reinterpret_cast<uword>(Symbols::PredefinedAddress())); 763 reinterpret_cast<uword>(Symbols::PredefinedAddress()));
743 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); 764 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize);
744 __ ldr(result, Address(result, char_code, LSL, 1)); // Char code is a smi. 765 __ ldr(result, Address(result, char_code, LSL, 1)); // Char code is a smi.
745 } 766 }
746 767
747 768
(...skipping 4098 matching lines...) Expand 10 before | Expand all | Expand 10 after
4846 compiler->GenerateCall(token_pos(), 4867 compiler->GenerateCall(token_pos(),
4847 &label, 4868 &label,
4848 PcDescriptors::kOther, 4869 PcDescriptors::kOther,
4849 locs()); 4870 locs());
4850 __ Drop(2); // Discard type arguments and receiver. 4871 __ Drop(2); // Discard type arguments and receiver.
4851 } 4872 }
4852 4873
4853 } // namespace dart 4874 } // namespace dart
4854 4875
4855 #endif // defined TARGET_ARCH_ARM 4876 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698