| 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 4434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4445 | 4445 |
| 4446 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4446 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4447 compiler->GenerateCallRuntime(token_pos(), | 4447 compiler->GenerateCallRuntime(token_pos(), |
| 4448 deopt_id(), | 4448 deopt_id(), |
| 4449 kReThrowRuntimeEntry, | 4449 kReThrowRuntimeEntry, |
| 4450 locs()); | 4450 locs()); |
| 4451 __ bkpt(0); | 4451 __ bkpt(0); |
| 4452 } | 4452 } |
| 4453 | 4453 |
| 4454 | 4454 |
| 4455 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4456 __ Bind(compiler->GetJumpLabel(this)); |
| 4457 if (!compiler->is_optimizing()) { |
| 4458 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 4459 deopt_id_, |
| 4460 Scanner::kDummyTokenIndex); |
| 4461 // Add an edge counter. |
| 4462 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld)); |
| 4463 counter.SetAt(0, Smi::Handle(Smi::New(0))); |
| 4464 __ Comment("Edge counter"); |
| 4465 __ LoadObject(R0, counter); |
| 4466 __ ldr(IP, FieldAddress(R0, Array::element_offset(0))); |
| 4467 __ adds(IP, IP, ShifterOperand(Smi::RawValue(1))); |
| 4468 __ LoadImmediate(IP, Smi::RawValue(Smi::kMaxValue), VS); // If overflow. |
| 4469 __ str(IP, FieldAddress(R0, Array::element_offset(0))); |
| 4470 } |
| 4471 if (HasParallelMove()) { |
| 4472 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 4473 } |
| 4474 } |
| 4475 |
| 4476 |
| 4455 LocationSummary* GotoInstr::MakeLocationSummary() const { | 4477 LocationSummary* GotoInstr::MakeLocationSummary() const { |
| 4456 return new LocationSummary(0, 0, LocationSummary::kNoCall); | 4478 return new LocationSummary(0, 0, LocationSummary::kNoCall); |
| 4457 } | 4479 } |
| 4458 | 4480 |
| 4459 | 4481 |
| 4460 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4482 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4461 if (HasParallelMove()) { | 4483 if (HasParallelMove()) { |
| 4462 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 4484 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 4463 } | 4485 } |
| 4464 | 4486 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4668 compiler->GenerateCall(token_pos(), | 4690 compiler->GenerateCall(token_pos(), |
| 4669 &label, | 4691 &label, |
| 4670 PcDescriptors::kOther, | 4692 PcDescriptors::kOther, |
| 4671 locs()); | 4693 locs()); |
| 4672 __ Drop(2); // Discard type arguments and receiver. | 4694 __ Drop(2); // Discard type arguments and receiver. |
| 4673 } | 4695 } |
| 4674 | 4696 |
| 4675 } // namespace dart | 4697 } // namespace dart |
| 4676 | 4698 |
| 4677 #endif // defined TARGET_ARCH_ARM | 4699 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |