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

Side by Side Diff: runtime/vm/intermediate_language_x64.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_mips.cc ('k') | runtime/vm/object.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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 __ Bind(entry_label()); 1506 __ Bind(entry_label());
1507 const Class& double_class = compiler->double_class(); 1507 const Class& double_class = compiler->double_class();
1508 const Code& stub = 1508 const Code& stub =
1509 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); 1509 Code::Handle(StubCode::GetAllocationStubForClass(double_class));
1510 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); 1510 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
1511 1511
1512 LocationSummary* locs = instruction_->locs(); 1512 LocationSummary* locs = instruction_->locs();
1513 locs->live_registers()->Remove(locs->out()); 1513 locs->live_registers()->Remove(locs->out());
1514 1514
1515 compiler->SaveLiveRegisters(locs); 1515 compiler->SaveLiveRegisters(locs);
1516 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 1516 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
1517 &label, 1517 &label,
1518 PcDescriptors::kOther, 1518 PcDescriptors::kOther,
1519 locs); 1519 locs);
1520 __ MoveRegister(locs->temp(0).reg(), RAX); 1520 __ MoveRegister(locs->temp(0).reg(), RAX);
1521 compiler->RestoreLiveRegisters(locs); 1521 compiler->RestoreLiveRegisters(locs);
1522 1522
1523 __ jmp(exit_label()); 1523 __ jmp(exit_label());
1524 } 1524 }
1525 1525
1526 private: 1526 private:
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 __ Bind(entry_label()); 1785 __ Bind(entry_label());
1786 const Class& double_class = compiler->double_class(); 1786 const Class& double_class = compiler->double_class();
1787 const Code& stub = 1787 const Code& stub =
1788 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); 1788 Code::Handle(StubCode::GetAllocationStubForClass(double_class));
1789 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); 1789 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
1790 1790
1791 LocationSummary* locs = instruction_->locs(); 1791 LocationSummary* locs = instruction_->locs();
1792 locs->live_registers()->Remove(locs->out()); 1792 locs->live_registers()->Remove(locs->out());
1793 1793
1794 compiler->SaveLiveRegisters(locs); 1794 compiler->SaveLiveRegisters(locs);
1795 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 1795 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
1796 &label, 1796 &label,
1797 PcDescriptors::kOther, 1797 PcDescriptors::kOther,
1798 locs); 1798 locs);
1799 __ MoveRegister(locs->out().reg(), RAX); 1799 __ MoveRegister(locs->out().reg(), RAX);
1800 compiler->RestoreLiveRegisters(locs); 1800 compiler->RestoreLiveRegisters(locs);
1801 1801
1802 __ jmp(exit_label()); 1802 __ jmp(exit_label());
1803 } 1803 }
1804 1804
1805 private: 1805 private:
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2937 __ Bind(entry_label()); 2937 __ Bind(entry_label());
2938 const Class& float32x4_class = compiler->float32x4_class(); 2938 const Class& float32x4_class = compiler->float32x4_class();
2939 const Code& stub = 2939 const Code& stub =
2940 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); 2940 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class));
2941 const ExternalLabel label(float32x4_class.ToCString(), stub.EntryPoint()); 2941 const ExternalLabel label(float32x4_class.ToCString(), stub.EntryPoint());
2942 2942
2943 LocationSummary* locs = instruction_->locs(); 2943 LocationSummary* locs = instruction_->locs();
2944 locs->live_registers()->Remove(locs->out()); 2944 locs->live_registers()->Remove(locs->out());
2945 2945
2946 compiler->SaveLiveRegisters(locs); 2946 compiler->SaveLiveRegisters(locs);
2947 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 2947 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
2948 &label, 2948 &label,
2949 PcDescriptors::kOther, 2949 PcDescriptors::kOther,
2950 locs); 2950 locs);
2951 __ MoveRegister(locs->out().reg(), RAX); 2951 __ MoveRegister(locs->out().reg(), RAX);
2952 compiler->RestoreLiveRegisters(locs); 2952 compiler->RestoreLiveRegisters(locs);
2953 2953
2954 __ jmp(exit_label()); 2954 __ jmp(exit_label());
2955 } 2955 }
2956 2956
2957 private: 2957 private:
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
3023 __ Bind(entry_label()); 3023 __ Bind(entry_label());
3024 const Class& int32x4_class = compiler->int32x4_class(); 3024 const Class& int32x4_class = compiler->int32x4_class();
3025 const Code& stub = 3025 const Code& stub =
3026 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class)); 3026 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class));
3027 const ExternalLabel label(int32x4_class.ToCString(), stub.EntryPoint()); 3027 const ExternalLabel label(int32x4_class.ToCString(), stub.EntryPoint());
3028 3028
3029 LocationSummary* locs = instruction_->locs(); 3029 LocationSummary* locs = instruction_->locs();
3030 locs->live_registers()->Remove(locs->out()); 3030 locs->live_registers()->Remove(locs->out());
3031 3031
3032 compiler->SaveLiveRegisters(locs); 3032 compiler->SaveLiveRegisters(locs);
3033 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 3033 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
3034 &label, 3034 &label,
3035 PcDescriptors::kOther, 3035 PcDescriptors::kOther,
3036 locs); 3036 locs);
3037 __ MoveRegister(locs->out().reg(), RAX); 3037 __ MoveRegister(locs->out().reg(), RAX);
3038 compiler->RestoreLiveRegisters(locs); 3038 compiler->RestoreLiveRegisters(locs);
3039 3039
3040 __ jmp(exit_label()); 3040 __ jmp(exit_label());
3041 } 3041 }
3042 3042
3043 private: 3043 private:
(...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
4714 4714
4715 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4715 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4716 __ Bind(compiler->GetJumpLabel(this)); 4716 __ Bind(compiler->GetJumpLabel(this));
4717 if (!compiler->is_optimizing()) { 4717 if (!compiler->is_optimizing()) {
4718 compiler->EmitEdgeCounter(); 4718 compiler->EmitEdgeCounter();
4719 // The deoptimization descriptor points after the edge counter code for 4719 // The deoptimization descriptor points after the edge counter code for
4720 // uniformity with ARM and MIPS, where we can reuse pattern matching 4720 // uniformity with ARM and MIPS, where we can reuse pattern matching
4721 // code that matches backwards from the end of the pattern. 4721 // code that matches backwards from the end of the pattern.
4722 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 4722 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
4723 deopt_id_, 4723 deopt_id_,
4724 Scanner::kDummyTokenIndex); 4724 Scanner::kNoSourcePos);
4725 } 4725 }
4726 if (HasParallelMove()) { 4726 if (HasParallelMove()) {
4727 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 4727 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
4728 } 4728 }
4729 } 4729 }
4730 4730
4731 4731
4732 LocationSummary* GotoInstr::MakeLocationSummary(bool opt) const { 4732 LocationSummary* GotoInstr::MakeLocationSummary(bool opt) const {
4733 return new LocationSummary(0, 0, LocationSummary::kNoCall); 4733 return new LocationSummary(0, 0, LocationSummary::kNoCall);
4734 } 4734 }
4735 4735
4736 4736
4737 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4737 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4738 if (!compiler->is_optimizing()) { 4738 if (!compiler->is_optimizing()) {
4739 compiler->EmitEdgeCounter(); 4739 compiler->EmitEdgeCounter();
4740 // Add a deoptimization descriptor for deoptimizing instructions that 4740 // Add a deoptimization descriptor for deoptimizing instructions that
4741 // may be inserted before this instruction. This descriptor points 4741 // may be inserted before this instruction. This descriptor points
4742 // after the edge counter for uniformity with ARM and MIPS, where we can 4742 // after the edge counter for uniformity with ARM and MIPS, where we can
4743 // reuse pattern matching that matches backwards from the end of the 4743 // reuse pattern matching that matches backwards from the end of the
4744 // pattern. 4744 // pattern.
4745 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 4745 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
4746 GetDeoptId(), 4746 GetDeoptId(),
4747 Scanner::kDummyTokenIndex); 4747 Scanner::kNoSourcePos);
4748 } 4748 }
4749 if (HasParallelMove()) { 4749 if (HasParallelMove()) {
4750 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 4750 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
4751 } 4751 }
4752 4752
4753 // We can fall through if the successor is the next block in the list. 4753 // We can fall through if the successor is the next block in the list.
4754 // Otherwise, we need a jump. 4754 // Otherwise, we need a jump.
4755 if (!compiler->CanFallThroughTo(successor())) { 4755 if (!compiler->CanFallThroughTo(successor())) {
4756 __ jmp(compiler->GetJumpLabel(successor())); 4756 __ jmp(compiler->GetJumpLabel(successor()));
4757 } 4757 }
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 PcDescriptors::kOther, 4959 PcDescriptors::kOther,
4960 locs()); 4960 locs());
4961 __ Drop(2); // Discard type arguments and receiver. 4961 __ Drop(2); // Discard type arguments and receiver.
4962 } 4962 }
4963 4963
4964 } // namespace dart 4964 } // namespace dart
4965 4965
4966 #undef __ 4966 #undef __
4967 4967
4968 #endif // defined TARGET_ARCH_X64 4968 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698