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

Side by Side Diff: runtime/vm/intermediate_language_ia32.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_arm.cc ('k') | runtime/vm/intermediate_language_mips.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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 __ Bind(entry_label()); 1606 __ Bind(entry_label());
1607 const Class& double_class = compiler->double_class(); 1607 const Class& double_class = compiler->double_class();
1608 const Code& stub = 1608 const Code& stub =
1609 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); 1609 Code::Handle(StubCode::GetAllocationStubForClass(double_class));
1610 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); 1610 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
1611 1611
1612 LocationSummary* locs = instruction_->locs(); 1612 LocationSummary* locs = instruction_->locs();
1613 locs->live_registers()->Remove(locs->out()); 1613 locs->live_registers()->Remove(locs->out());
1614 1614
1615 compiler->SaveLiveRegisters(locs); 1615 compiler->SaveLiveRegisters(locs);
1616 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 1616 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
1617 &label, 1617 &label,
1618 PcDescriptors::kOther, 1618 PcDescriptors::kOther,
1619 locs); 1619 locs);
1620 __ MoveRegister(locs->temp(0).reg(), EAX); 1620 __ MoveRegister(locs->temp(0).reg(), EAX);
1621 compiler->RestoreLiveRegisters(locs); 1621 compiler->RestoreLiveRegisters(locs);
1622 1622
1623 __ jmp(exit_label()); 1623 __ jmp(exit_label());
1624 } 1624 }
1625 1625
1626 private: 1626 private:
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 __ Bind(entry_label()); 1890 __ Bind(entry_label());
1891 const Class& double_class = compiler->double_class(); 1891 const Class& double_class = compiler->double_class();
1892 const Code& stub = 1892 const Code& stub =
1893 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); 1893 Code::Handle(StubCode::GetAllocationStubForClass(double_class));
1894 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint()); 1894 const ExternalLabel label(double_class.ToCString(), stub.EntryPoint());
1895 1895
1896 LocationSummary* locs = instruction_->locs(); 1896 LocationSummary* locs = instruction_->locs();
1897 locs->live_registers()->Remove(locs->out()); 1897 locs->live_registers()->Remove(locs->out());
1898 1898
1899 compiler->SaveLiveRegisters(locs); 1899 compiler->SaveLiveRegisters(locs);
1900 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 1900 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
1901 &label, 1901 &label,
1902 PcDescriptors::kOther, 1902 PcDescriptors::kOther,
1903 locs); 1903 locs);
1904 __ MoveRegister(locs->out().reg(), EAX); 1904 __ MoveRegister(locs->out().reg(), EAX);
1905 compiler->RestoreLiveRegisters(locs); 1905 compiler->RestoreLiveRegisters(locs);
1906 1906
1907 __ jmp(exit_label()); 1907 __ jmp(exit_label());
1908 } 1908 }
1909 1909
1910 private: 1910 private:
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
2932 __ Bind(entry_label()); 2932 __ Bind(entry_label());
2933 const Class& float32x4_class = compiler->float32x4_class(); 2933 const Class& float32x4_class = compiler->float32x4_class();
2934 const Code& stub = 2934 const Code& stub =
2935 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); 2935 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class));
2936 const ExternalLabel label(float32x4_class.ToCString(), stub.EntryPoint()); 2936 const ExternalLabel label(float32x4_class.ToCString(), stub.EntryPoint());
2937 2937
2938 LocationSummary* locs = instruction_->locs(); 2938 LocationSummary* locs = instruction_->locs();
2939 locs->live_registers()->Remove(locs->out()); 2939 locs->live_registers()->Remove(locs->out());
2940 2940
2941 compiler->SaveLiveRegisters(locs); 2941 compiler->SaveLiveRegisters(locs);
2942 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 2942 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
2943 &label, 2943 &label,
2944 PcDescriptors::kOther, 2944 PcDescriptors::kOther,
2945 locs); 2945 locs);
2946 __ MoveRegister(locs->out().reg(), EAX); 2946 __ MoveRegister(locs->out().reg(), EAX);
2947 compiler->RestoreLiveRegisters(locs); 2947 compiler->RestoreLiveRegisters(locs);
2948 2948
2949 __ jmp(exit_label()); 2949 __ jmp(exit_label());
2950 } 2950 }
2951 2951
2952 private: 2952 private:
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
3026 __ Bind(entry_label()); 3026 __ Bind(entry_label());
3027 const Class& int32x4_class = compiler->int32x4_class(); 3027 const Class& int32x4_class = compiler->int32x4_class();
3028 const Code& stub = 3028 const Code& stub =
3029 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class)); 3029 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class));
3030 const ExternalLabel label(int32x4_class.ToCString(), stub.EntryPoint()); 3030 const ExternalLabel label(int32x4_class.ToCString(), stub.EntryPoint());
3031 3031
3032 LocationSummary* locs = instruction_->locs(); 3032 LocationSummary* locs = instruction_->locs();
3033 locs->live_registers()->Remove(locs->out()); 3033 locs->live_registers()->Remove(locs->out());
3034 3034
3035 compiler->SaveLiveRegisters(locs); 3035 compiler->SaveLiveRegisters(locs);
3036 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 3036 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
3037 &label, 3037 &label,
3038 PcDescriptors::kOther, 3038 PcDescriptors::kOther,
3039 locs); 3039 locs);
3040 __ MoveRegister(locs->out().reg(), EAX); 3040 __ MoveRegister(locs->out().reg(), EAX);
3041 compiler->RestoreLiveRegisters(locs); 3041 compiler->RestoreLiveRegisters(locs);
3042 3042
3043 __ jmp(exit_label()); 3043 __ jmp(exit_label());
3044 } 3044 }
3045 3045
3046 private: 3046 private:
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
4628 const Class& mint_class = 4628 const Class& mint_class =
4629 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class()); 4629 Class::ZoneHandle(Isolate::Current()->object_store()->mint_class());
4630 const Code& stub = 4630 const Code& stub =
4631 Code::Handle(StubCode::GetAllocationStubForClass(mint_class)); 4631 Code::Handle(StubCode::GetAllocationStubForClass(mint_class));
4632 const ExternalLabel label(mint_class.ToCString(), stub.EntryPoint()); 4632 const ExternalLabel label(mint_class.ToCString(), stub.EntryPoint());
4633 4633
4634 LocationSummary* locs = instruction_->locs(); 4634 LocationSummary* locs = instruction_->locs();
4635 locs->live_registers()->Remove(locs->out()); 4635 locs->live_registers()->Remove(locs->out());
4636 4636
4637 compiler->SaveLiveRegisters(locs); 4637 compiler->SaveLiveRegisters(locs);
4638 compiler->GenerateCall(Scanner::kDummyTokenIndex, // No token position. 4638 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
4639 &label, 4639 &label,
4640 PcDescriptors::kOther, 4640 PcDescriptors::kOther,
4641 locs); 4641 locs);
4642 __ MoveRegister(locs->out().reg(), EAX); 4642 __ MoveRegister(locs->out().reg(), EAX);
4643 compiler->RestoreLiveRegisters(locs); 4643 compiler->RestoreLiveRegisters(locs);
4644 4644
4645 __ jmp(exit_label()); 4645 __ jmp(exit_label());
4646 } 4646 }
4647 4647
4648 private: 4648 private:
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
4927 4927
4928 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4928 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4929 __ Bind(compiler->GetJumpLabel(this)); 4929 __ Bind(compiler->GetJumpLabel(this));
4930 if (!compiler->is_optimizing()) { 4930 if (!compiler->is_optimizing()) {
4931 compiler->EmitEdgeCounter(); 4931 compiler->EmitEdgeCounter();
4932 // The deoptimization descriptor points after the edge counter code for 4932 // The deoptimization descriptor points after the edge counter code for
4933 // uniformity with ARM and MIPS, where we can reuse pattern matching 4933 // uniformity with ARM and MIPS, where we can reuse pattern matching
4934 // code that matches backwards from the end of the pattern. 4934 // code that matches backwards from the end of the pattern.
4935 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 4935 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
4936 deopt_id_, 4936 deopt_id_,
4937 Scanner::kDummyTokenIndex); 4937 Scanner::kNoSourcePos);
4938 } 4938 }
4939 if (HasParallelMove()) { 4939 if (HasParallelMove()) {
4940 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 4940 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
4941 } 4941 }
4942 } 4942 }
4943 4943
4944 4944
4945 LocationSummary* GotoInstr::MakeLocationSummary(bool opt) const { 4945 LocationSummary* GotoInstr::MakeLocationSummary(bool opt) const {
4946 return new LocationSummary(0, 0, LocationSummary::kNoCall); 4946 return new LocationSummary(0, 0, LocationSummary::kNoCall);
4947 } 4947 }
4948 4948
4949 4949
4950 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4950 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4951 if (!compiler->is_optimizing()) { 4951 if (!compiler->is_optimizing()) {
4952 compiler->EmitEdgeCounter(); 4952 compiler->EmitEdgeCounter();
4953 // Add a deoptimization descriptor for deoptimizing instructions that 4953 // Add a deoptimization descriptor for deoptimizing instructions that
4954 // may be inserted before this instruction. This descriptor points 4954 // may be inserted before this instruction. This descriptor points
4955 // after the edge counter for uniformity with ARM and MIPS, where we can 4955 // after the edge counter for uniformity with ARM and MIPS, where we can
4956 // reuse pattern matching that matches backwards from the end of the 4956 // reuse pattern matching that matches backwards from the end of the
4957 // pattern. 4957 // pattern.
4958 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 4958 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
4959 GetDeoptId(), 4959 GetDeoptId(),
4960 Scanner::kDummyTokenIndex); 4960 Scanner::kNoSourcePos);
4961 } 4961 }
4962 if (HasParallelMove()) { 4962 if (HasParallelMove()) {
4963 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 4963 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
4964 } 4964 }
4965 4965
4966 // We can fall through if the successor is the next block in the list. 4966 // We can fall through if the successor is the next block in the list.
4967 // Otherwise, we need a jump. 4967 // Otherwise, we need a jump.
4968 if (!compiler->CanFallThroughTo(successor())) { 4968 if (!compiler->CanFallThroughTo(successor())) {
4969 __ jmp(compiler->GetJumpLabel(successor())); 4969 __ jmp(compiler->GetJumpLabel(successor()));
4970 } 4970 }
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
5234 PcDescriptors::kOther, 5234 PcDescriptors::kOther,
5235 locs()); 5235 locs());
5236 __ Drop(2); // Discard type arguments and receiver. 5236 __ Drop(2); // Discard type arguments and receiver.
5237 } 5237 }
5238 5238
5239 } // namespace dart 5239 } // namespace dart
5240 5240
5241 #undef __ 5241 #undef __
5242 5242
5243 #endif // defined TARGET_ARCH_IA32 5243 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698