| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 5014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5025 UNIMPLEMENTED(); | 5025 UNIMPLEMENTED(); |
| 5026 } | 5026 } |
| 5027 | 5027 |
| 5028 | 5028 |
| 5029 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( | 5029 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( |
| 5030 Zone* zone, bool opt) const { | 5030 Zone* zone, bool opt) const { |
| 5031 return MakeCallSummary(zone); | 5031 return MakeCallSummary(zone); |
| 5032 } | 5032 } |
| 5033 | 5033 |
| 5034 | 5034 |
| 5035 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | |
| 5036 ASSERT(ic_data().NumArgsTested() == 1); | |
| 5037 if (!with_checks()) { | |
| 5038 ASSERT(ic_data().HasOneTarget()); | |
| 5039 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); | |
| 5040 compiler->GenerateStaticCall(deopt_id(), | |
| 5041 instance_call()->token_pos(), | |
| 5042 target, | |
| 5043 instance_call()->ArgumentCount(), | |
| 5044 instance_call()->argument_names(), | |
| 5045 locs(), | |
| 5046 ICData::Handle()); | |
| 5047 return; | |
| 5048 } | |
| 5049 | |
| 5050 Label* deopt = compiler->AddDeoptStub( | |
| 5051 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); | |
| 5052 Label ok; | |
| 5053 compiler->EmitTestAndCall(ic_data(), | |
| 5054 instance_call()->ArgumentCount(), | |
| 5055 instance_call()->argument_names(), | |
| 5056 deopt, | |
| 5057 &ok, | |
| 5058 deopt_id(), | |
| 5059 instance_call()->token_pos(), | |
| 5060 locs()); | |
| 5061 __ Bind(&ok); | |
| 5062 } | |
| 5063 | |
| 5064 | |
| 5065 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, | 5035 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, |
| 5066 bool opt) const { | 5036 bool opt) const { |
| 5067 comparison()->InitializeLocationSummary(zone, opt); | 5037 comparison()->InitializeLocationSummary(zone, opt); |
| 5068 // Branches don't produce a result. | 5038 // Branches don't produce a result. |
| 5069 comparison()->locs()->set_out(0, Location::NoLocation()); | 5039 comparison()->locs()->set_out(0, Location::NoLocation()); |
| 5070 return comparison()->locs(); | 5040 return comparison()->locs(); |
| 5071 } | 5041 } |
| 5072 | 5042 |
| 5073 | 5043 |
| 5074 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5044 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5656 1, | 5626 1, |
| 5657 locs()); | 5627 locs()); |
| 5658 __ Drop(1); | 5628 __ Drop(1); |
| 5659 __ Pop(result); | 5629 __ Pop(result); |
| 5660 } | 5630 } |
| 5661 | 5631 |
| 5662 | 5632 |
| 5663 } // namespace dart | 5633 } // namespace dart |
| 5664 | 5634 |
| 5665 #endif // defined TARGET_ARCH_ARM64 | 5635 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |