| 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_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 4417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4428 compiler->SetNeedsStacktrace(catch_try_index()); | 4428 compiler->SetNeedsStacktrace(catch_try_index()); |
| 4429 compiler->GenerateCallRuntime(token_pos(), | 4429 compiler->GenerateCallRuntime(token_pos(), |
| 4430 deopt_id(), | 4430 deopt_id(), |
| 4431 kReThrowRuntimeEntry, | 4431 kReThrowRuntimeEntry, |
| 4432 2, | 4432 2, |
| 4433 locs()); | 4433 locs()); |
| 4434 __ bkpt(0); | 4434 __ bkpt(0); |
| 4435 } | 4435 } |
| 4436 | 4436 |
| 4437 | 4437 |
| 4438 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4439 if (!compiler->CanFallThroughTo(normal_entry())) { |
| 4440 __ b(compiler->GetJumpLabel(normal_entry())); |
| 4441 } |
| 4442 } |
| 4443 |
| 4444 |
| 4438 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4445 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4439 __ Bind(compiler->GetJumpLabel(this)); | 4446 __ Bind(compiler->GetJumpLabel(this)); |
| 4440 if (!compiler->is_optimizing()) { | 4447 if (!compiler->is_optimizing()) { |
| 4441 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | 4448 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 4442 deopt_id_, | 4449 deopt_id_, |
| 4443 Scanner::kDummyTokenIndex); | 4450 Scanner::kDummyTokenIndex); |
| 4444 // Add an edge counter. | 4451 // Add an edge counter. |
| 4445 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld)); | 4452 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld)); |
| 4446 counter.SetAt(0, Smi::Handle(Smi::New(0))); | 4453 counter.SetAt(0, Smi::Handle(Smi::New(0))); |
| 4447 __ Comment("Edge counter"); | 4454 __ Comment("Edge counter"); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4484 } | 4491 } |
| 4485 } | 4492 } |
| 4486 | 4493 |
| 4487 | 4494 |
| 4488 void ControlInstruction::EmitBranchOnCondition(FlowGraphCompiler* compiler, | 4495 void ControlInstruction::EmitBranchOnCondition(FlowGraphCompiler* compiler, |
| 4489 Condition true_condition) { | 4496 Condition true_condition) { |
| 4490 if (compiler->CanFallThroughTo(false_successor())) { | 4497 if (compiler->CanFallThroughTo(false_successor())) { |
| 4491 // If the next block is the false successor we will fall through to it. | 4498 // If the next block is the false successor we will fall through to it. |
| 4492 __ b(compiler->GetJumpLabel(true_successor()), true_condition); | 4499 __ b(compiler->GetJumpLabel(true_successor()), true_condition); |
| 4493 } else { | 4500 } else { |
| 4494 // If the next block is the true successor we negate comparison and fall | 4501 // If the next block is not the false successor we will branch to it. |
| 4495 // through to it. | |
| 4496 Condition false_condition = NegateCondition(true_condition); | 4502 Condition false_condition = NegateCondition(true_condition); |
| 4497 __ b(compiler->GetJumpLabel(false_successor()), false_condition); | 4503 __ b(compiler->GetJumpLabel(false_successor()), false_condition); |
| 4498 | 4504 |
| 4499 // Fall through or jump to the true successor. | 4505 // Fall through or jump to the true successor. |
| 4500 if (!compiler->CanFallThroughTo(true_successor())) { | 4506 if (!compiler->CanFallThroughTo(true_successor())) { |
| 4501 __ b(compiler->GetJumpLabel(true_successor())); | 4507 __ b(compiler->GetJumpLabel(true_successor())); |
| 4502 } | 4508 } |
| 4503 } | 4509 } |
| 4504 } | 4510 } |
| 4505 | 4511 |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4673 compiler->GenerateCall(token_pos(), | 4679 compiler->GenerateCall(token_pos(), |
| 4674 &label, | 4680 &label, |
| 4675 PcDescriptors::kOther, | 4681 PcDescriptors::kOther, |
| 4676 locs()); | 4682 locs()); |
| 4677 __ Drop(2); // Discard type arguments and receiver. | 4683 __ Drop(2); // Discard type arguments and receiver. |
| 4678 } | 4684 } |
| 4679 | 4685 |
| 4680 } // namespace dart | 4686 } // namespace dart |
| 4681 | 4687 |
| 4682 #endif // defined TARGET_ARCH_ARM | 4688 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |