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

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

Issue 144343002: Rename kDummyTokenIndex to kNoSourcePos (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.cc ('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 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 __ Bind(entry_label()); 1597 __ Bind(entry_label());
1598 const Class& double_class = compiler->double_class(); 1598 const Class& double_class = compiler->double_class();
1599 const Code& stub = 1599 const Code& stub =
1600 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); 1600 Code::Handle(StubCode::GetAllocationStubForClass(double_class));
1601 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); 1601 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
1602 1602
1603 LocationSummary* locs = instruction_->locs(); 1603 LocationSummary* locs = instruction_->locs();
1604 locs->live_registers()->Remove(locs->out()); 1604 locs->live_registers()->Remove(locs->out());
1605 1605
1606 compiler->SaveLiveRegisters(locs); 1606 compiler->SaveLiveRegisters(locs);
1607 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 1607 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
1608 &label, 1608 &label,
1609 PcDescriptors::kOther, 1609 PcDescriptors::kOther,
1610 locs); 1610 locs);
1611 __ MoveRegister(locs->temp(0).reg(), R0); 1611 __ MoveRegister(locs->temp(0).reg(), R0);
1612 compiler->RestoreLiveRegisters(locs); 1612 compiler->RestoreLiveRegisters(locs);
1613 1613
1614 __ b(exit_label()); 1614 __ b(exit_label());
1615 } 1615 }
1616 1616
1617 private: 1617 private:
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 __ Bind(entry_label()); 1877 __ Bind(entry_label());
1878 const Class& double_class = compiler->double_class(); 1878 const Class& double_class = compiler->double_class();
1879 const Code& stub = 1879 const Code& stub =
1880 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); 1880 Code::Handle(StubCode::GetAllocationStubForClass(double_class));
1881 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); 1881 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
1882 1882
1883 LocationSummary* locs = instruction_->locs(); 1883 LocationSummary* locs = instruction_->locs();
1884 locs->live_registers()->Remove(locs->out()); 1884 locs->live_registers()->Remove(locs->out());
1885 1885
1886 compiler->SaveLiveRegisters(locs); 1886 compiler->SaveLiveRegisters(locs);
1887 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 1887 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
1888 &label, 1888 &label,
1889 PcDescriptors::kOther, 1889 PcDescriptors::kOther,
1890 locs); 1890 locs);
1891 __ MoveRegister(locs->out().reg(), R0); 1891 __ MoveRegister(locs->out().reg(), R0);
1892 compiler->RestoreLiveRegisters(locs); 1892 compiler->RestoreLiveRegisters(locs);
1893 1893
1894 __ b(exit_label()); 1894 __ b(exit_label());
1895 } 1895 }
1896 1896
1897 private: 1897 private:
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2876 __ Bind(entry_label()); 2876 __ Bind(entry_label());
2877 const Class& float32x4_class = compiler->float32x4_class(); 2877 const Class& float32x4_class = compiler->float32x4_class();
2878 const Code& stub = 2878 const Code& stub =
2879 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); 2879 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class));
2880 const ExternalLabel label(float32x4_class.ToCString(), stub.EntryPoint()); 2880 const ExternalLabel label(float32x4_class.ToCString(), stub.EntryPoint());
2881 2881
2882 LocationSummary* locs = instruction_->locs(); 2882 LocationSummary* locs = instruction_->locs();
2883 locs->live_registers()->Remove(locs->out()); 2883 locs->live_registers()->Remove(locs->out());
2884 2884
2885 compiler->SaveLiveRegisters(locs); 2885 compiler->SaveLiveRegisters(locs);
2886 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 2886 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
2887 &label, 2887 &label,
2888 PcDescriptors::kOther, 2888 PcDescriptors::kOther,
2889 locs); 2889 locs);
2890 __ mov(locs->out().reg(), ShifterOperand(R0)); 2890 __ mov(locs->out().reg(), ShifterOperand(R0));
2891 compiler->RestoreLiveRegisters(locs); 2891 compiler->RestoreLiveRegisters(locs);
2892 2892
2893 __ b(exit_label()); 2893 __ b(exit_label());
2894 } 2894 }
2895 2895
2896 private: 2896 private:
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
2981 __ Bind(entry_label()); 2981 __ Bind(entry_label());
2982 const Class& int32x4_class = compiler->int32x4_class(); 2982 const Class& int32x4_class = compiler->int32x4_class();
2983 const Code& stub = 2983 const Code& stub =
2984 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class)); 2984 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class));
2985 const ExternalLabel label(int32x4_class.ToCString(), stub.EntryPoint()); 2985 const ExternalLabel label(int32x4_class.ToCString(), stub.EntryPoint());
2986 2986
2987 LocationSummary* locs = instruction_->locs(); 2987 LocationSummary* locs = instruction_->locs();
2988 locs->live_registers()->Remove(locs->out()); 2988 locs->live_registers()->Remove(locs->out());
2989 2989
2990 compiler->SaveLiveRegisters(locs); 2990 compiler->SaveLiveRegisters(locs);
2991 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 2991 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
2992 &label, 2992 &label,
2993 PcDescriptors::kOther, 2993 PcDescriptors::kOther,
2994 locs); 2994 locs);
2995 __ mov(locs->out().reg(), ShifterOperand(R0)); 2995 __ mov(locs->out().reg(), ShifterOperand(R0));
2996 compiler->RestoreLiveRegisters(locs); 2996 compiler->RestoreLiveRegisters(locs);
2997 2997
2998 __ b(exit_label()); 2998 __ b(exit_label());
2999 } 2999 }
3000 3000
3001 private: 3001 private:
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
4632 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4632 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4633 __ Bind(compiler->GetJumpLabel(this)); 4633 __ Bind(compiler->GetJumpLabel(this));
4634 if (!compiler->is_optimizing()) { 4634 if (!compiler->is_optimizing()) {
4635 compiler->EmitEdgeCounter(); 4635 compiler->EmitEdgeCounter();
4636 // Add an edge counter. 4636 // Add an edge counter.
4637 // On ARM the deoptimization descriptor points after the edge counter 4637 // On ARM the deoptimization descriptor points after the edge counter
4638 // code so that we can reuse the same pattern matching code as at call 4638 // code so that we can reuse the same pattern matching code as at call
4639 // sites, which matches backwards from the end of the pattern. 4639 // sites, which matches backwards from the end of the pattern.
4640 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 4640 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
4641 deopt_id_, 4641 deopt_id_,
4642 Scanner::kDummyTokenIndex); 4642 Scanner::kNoSourcePos);
4643 } 4643 }
4644 if (HasParallelMove()) { 4644 if (HasParallelMove()) {
4645 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 4645 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
4646 } 4646 }
4647 } 4647 }
4648 4648
4649 4649
4650 LocationSummary* GotoInstr::MakeLocationSummary(bool opt) const { 4650 LocationSummary* GotoInstr::MakeLocationSummary(bool opt) const {
4651 return new LocationSummary(0, 0, LocationSummary::kNoCall); 4651 return new LocationSummary(0, 0, LocationSummary::kNoCall);
4652 } 4652 }
4653 4653
4654 4654
4655 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4655 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4656 if (!compiler->is_optimizing()) { 4656 if (!compiler->is_optimizing()) {
4657 compiler->EmitEdgeCounter(); 4657 compiler->EmitEdgeCounter();
4658 // Add a deoptimization descriptor for deoptimizing instructions that 4658 // Add a deoptimization descriptor for deoptimizing instructions that
4659 // may be inserted before this instruction. On ARM this descriptor 4659 // may be inserted before this instruction. On ARM this descriptor
4660 // points after the edge counter code so that we can reuse the same 4660 // points after the edge counter code so that we can reuse the same
4661 // pattern matching code as at call sites, which matches backwards from 4661 // pattern matching code as at call sites, which matches backwards from
4662 // the end of the pattern. 4662 // the end of the pattern.
4663 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 4663 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
4664 GetDeoptId(), 4664 GetDeoptId(),
4665 Scanner::kDummyTokenIndex); 4665 Scanner::kNoSourcePos);
4666 } 4666 }
4667 if (HasParallelMove()) { 4667 if (HasParallelMove()) {
4668 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 4668 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
4669 } 4669 }
4670 4670
4671 // We can fall through if the successor is the next block in the list. 4671 // We can fall through if the successor is the next block in the list.
4672 // Otherwise, we need a jump. 4672 // Otherwise, we need a jump.
4673 if (!compiler->CanFallThroughTo(successor())) { 4673 if (!compiler->CanFallThroughTo(successor())) {
4674 __ b(compiler->GetJumpLabel(successor())); 4674 __ b(compiler->GetJumpLabel(successor()));
4675 } 4675 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
4834 compiler->GenerateCall(token_pos(), 4834 compiler->GenerateCall(token_pos(),
4835 &label, 4835 &label,
4836 PcDescriptors::kOther, 4836 PcDescriptors::kOther,
4837 locs()); 4837 locs());
4838 __ Drop(2); // Discard type arguments and receiver. 4838 __ Drop(2); // Discard type arguments and receiver.
4839 } 4839 }
4840 4840
4841 } // namespace dart 4841 } // namespace dart
4842 4842
4843 #endif // defined TARGET_ARCH_ARM 4843 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698