| OLD | NEW |
| 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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 3814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3825 instance_call()->ArgumentCount(), | 3825 instance_call()->ArgumentCount(), |
| 3826 instance_call()->argument_names(), | 3826 instance_call()->argument_names(), |
| 3827 deopt, | 3827 deopt, |
| 3828 deopt_id(), | 3828 deopt_id(), |
| 3829 instance_call()->token_pos(), | 3829 instance_call()->token_pos(), |
| 3830 locs()); | 3830 locs()); |
| 3831 } | 3831 } |
| 3832 | 3832 |
| 3833 | 3833 |
| 3834 LocationSummary* BranchInstr::MakeLocationSummary() const { | 3834 LocationSummary* BranchInstr::MakeLocationSummary() const { |
| 3835 UNREACHABLE(); | 3835 LocationSummary* summary = comparison()->locs(); |
| 3836 return NULL; | 3836 // Share the location summary with the comparison. Branches don't produce |
| 3837 // a result. |
| 3838 summary->set_out(Location::NoLocation()); |
| 3839 return summary; |
| 3837 } | 3840 } |
| 3838 | 3841 |
| 3839 | 3842 |
| 3840 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3843 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3841 comparison()->EmitBranchCode(compiler, this); | 3844 comparison()->EmitBranchCode(compiler, this); |
| 3842 } | 3845 } |
| 3843 | 3846 |
| 3844 | 3847 |
| 3845 LocationSummary* CheckClassInstr::MakeLocationSummary() const { | 3848 LocationSummary* CheckClassInstr::MakeLocationSummary() const { |
| 3846 const intptr_t kNumInputs = 1; | 3849 const intptr_t kNumInputs = 1; |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4056 __ int3(); | 4059 __ int3(); |
| 4057 } | 4060 } |
| 4058 | 4061 |
| 4059 | 4062 |
| 4060 LocationSummary* GotoInstr::MakeLocationSummary() const { | 4063 LocationSummary* GotoInstr::MakeLocationSummary() const { |
| 4061 return new LocationSummary(0, 0, LocationSummary::kNoCall); | 4064 return new LocationSummary(0, 0, LocationSummary::kNoCall); |
| 4062 } | 4065 } |
| 4063 | 4066 |
| 4064 | 4067 |
| 4065 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4068 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4066 if (!compiler->is_optimizing()) { | |
| 4067 // Add deoptimization descriptor for deoptimizing instructions that may | |
| 4068 // be inserted before this instruction. | |
| 4069 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | |
| 4070 GetDeoptId(), | |
| 4071 0); // No token position. | |
| 4072 } | |
| 4073 | |
| 4074 if (HasParallelMove()) { | 4069 if (HasParallelMove()) { |
| 4075 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 4070 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 4076 } | 4071 } |
| 4077 | 4072 |
| 4078 // We can fall through if the successor is the next block in the list. | 4073 // We can fall through if the successor is the next block in the list. |
| 4079 // Otherwise, we need a jump. | 4074 // Otherwise, we need a jump. |
| 4080 if (!compiler->CanFallThroughTo(successor())) { | 4075 if (!compiler->CanFallThroughTo(successor())) { |
| 4081 __ jmp(compiler->GetJumpLabel(successor())); | 4076 __ jmp(compiler->GetJumpLabel(successor())); |
| 4082 } | 4077 } |
| 4083 } | 4078 } |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4323 PcDescriptors::kOther, | 4318 PcDescriptors::kOther, |
| 4324 locs()); | 4319 locs()); |
| 4325 __ Drop(2); // Discard type arguments and receiver. | 4320 __ Drop(2); // Discard type arguments and receiver. |
| 4326 } | 4321 } |
| 4327 | 4322 |
| 4328 } // namespace dart | 4323 } // namespace dart |
| 4329 | 4324 |
| 4330 #undef __ | 4325 #undef __ |
| 4331 | 4326 |
| 4332 #endif // defined TARGET_ARCH_X64 | 4327 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |