| 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_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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 3765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3776 instance_call()->ArgumentCount(), | 3776 instance_call()->ArgumentCount(), |
| 3777 instance_call()->argument_names(), | 3777 instance_call()->argument_names(), |
| 3778 deopt, | 3778 deopt, |
| 3779 deopt_id(), | 3779 deopt_id(), |
| 3780 instance_call()->token_pos(), | 3780 instance_call()->token_pos(), |
| 3781 locs()); | 3781 locs()); |
| 3782 } | 3782 } |
| 3783 | 3783 |
| 3784 | 3784 |
| 3785 LocationSummary* BranchInstr::MakeLocationSummary() const { | 3785 LocationSummary* BranchInstr::MakeLocationSummary() const { |
| 3786 UNREACHABLE(); | 3786 LocationSummary* summary = comparison()->locs(); |
| 3787 return NULL; | 3787 // Share the location summary with the comparison. Branches don't produce |
| 3788 // a result. |
| 3789 summary->set_out(Location::NoLocation()); |
| 3790 return summary; |
| 3788 } | 3791 } |
| 3789 | 3792 |
| 3790 | 3793 |
| 3791 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3794 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3792 comparison()->EmitBranchCode(compiler, this); | 3795 comparison()->EmitBranchCode(compiler, this); |
| 3793 } | 3796 } |
| 3794 | 3797 |
| 3795 | 3798 |
| 3796 LocationSummary* CheckClassInstr::MakeLocationSummary() const { | 3799 LocationSummary* CheckClassInstr::MakeLocationSummary() const { |
| 3797 const intptr_t kNumInputs = 1; | 3800 const intptr_t kNumInputs = 1; |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4255 __ int3(); | 4258 __ int3(); |
| 4256 } | 4259 } |
| 4257 | 4260 |
| 4258 | 4261 |
| 4259 LocationSummary* GotoInstr::MakeLocationSummary() const { | 4262 LocationSummary* GotoInstr::MakeLocationSummary() const { |
| 4260 return new LocationSummary(0, 0, LocationSummary::kNoCall); | 4263 return new LocationSummary(0, 0, LocationSummary::kNoCall); |
| 4261 } | 4264 } |
| 4262 | 4265 |
| 4263 | 4266 |
| 4264 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4267 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4265 if (!compiler->is_optimizing()) { | |
| 4266 // Add deoptimization descriptor for deoptimizing instructions that may | |
| 4267 // be inserted before this instruction. | |
| 4268 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | |
| 4269 GetDeoptId(), | |
| 4270 0); // No token position. | |
| 4271 } | |
| 4272 | |
| 4273 if (HasParallelMove()) { | 4268 if (HasParallelMove()) { |
| 4274 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 4269 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 4275 } | 4270 } |
| 4276 | 4271 |
| 4277 // We can fall through if the successor is the next block in the list. | 4272 // We can fall through if the successor is the next block in the list. |
| 4278 // Otherwise, we need a jump. | 4273 // Otherwise, we need a jump. |
| 4279 if (!compiler->CanFallThroughTo(successor())) { | 4274 if (!compiler->CanFallThroughTo(successor())) { |
| 4280 __ jmp(compiler->GetJumpLabel(successor())); | 4275 __ jmp(compiler->GetJumpLabel(successor())); |
| 4281 } | 4276 } |
| 4282 } | 4277 } |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4679 PcDescriptors::kOther, | 4674 PcDescriptors::kOther, |
| 4680 locs()); | 4675 locs()); |
| 4681 __ Drop(2); // Discard type arguments and receiver. | 4676 __ Drop(2); // Discard type arguments and receiver. |
| 4682 } | 4677 } |
| 4683 | 4678 |
| 4684 } // namespace dart | 4679 } // namespace dart |
| 4685 | 4680 |
| 4686 #undef __ | 4681 #undef __ |
| 4687 | 4682 |
| 4688 #endif // defined TARGET_ARCH_IA32 | 4683 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |