| 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 "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 5423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5434 UNIMPLEMENTED(); | 5434 UNIMPLEMENTED(); |
| 5435 } | 5435 } |
| 5436 | 5436 |
| 5437 | 5437 |
| 5438 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( | 5438 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( |
| 5439 Zone* zone, bool opt) const { | 5439 Zone* zone, bool opt) const { |
| 5440 return MakeCallSummary(zone); | 5440 return MakeCallSummary(zone); |
| 5441 } | 5441 } |
| 5442 | 5442 |
| 5443 | 5443 |
| 5444 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | |
| 5445 ASSERT(ic_data().NumArgsTested() == 1); | |
| 5446 if (!with_checks()) { | |
| 5447 ASSERT(ic_data().HasOneTarget()); | |
| 5448 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); | |
| 5449 compiler->GenerateStaticCall(deopt_id(), | |
| 5450 instance_call()->token_pos(), | |
| 5451 target, | |
| 5452 instance_call()->ArgumentCount(), | |
| 5453 instance_call()->argument_names(), | |
| 5454 locs(), | |
| 5455 ICData::Handle()); | |
| 5456 return; | |
| 5457 } | |
| 5458 | |
| 5459 Label* deopt = compiler->AddDeoptStub( | |
| 5460 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); | |
| 5461 Label ok; | |
| 5462 compiler->EmitTestAndCall(ic_data(), | |
| 5463 instance_call()->ArgumentCount(), | |
| 5464 instance_call()->argument_names(), | |
| 5465 deopt, | |
| 5466 &ok, | |
| 5467 deopt_id(), | |
| 5468 instance_call()->token_pos(), | |
| 5469 locs()); | |
| 5470 __ Bind(&ok); | |
| 5471 } | |
| 5472 | |
| 5473 | |
| 5474 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, | 5444 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, |
| 5475 bool opt) const { | 5445 bool opt) const { |
| 5476 comparison()->InitializeLocationSummary(zone, opt); | 5446 comparison()->InitializeLocationSummary(zone, opt); |
| 5477 // Branches don't produce a result. | 5447 // Branches don't produce a result. |
| 5478 comparison()->locs()->set_out(0, Location::NoLocation()); | 5448 comparison()->locs()->set_out(0, Location::NoLocation()); |
| 5479 return comparison()->locs(); | 5449 return comparison()->locs(); |
| 5480 } | 5450 } |
| 5481 | 5451 |
| 5482 | 5452 |
| 5483 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5453 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6456 __ Drop(1); | 6426 __ Drop(1); |
| 6457 __ popq(result); | 6427 __ popq(result); |
| 6458 } | 6428 } |
| 6459 | 6429 |
| 6460 | 6430 |
| 6461 } // namespace dart | 6431 } // namespace dart |
| 6462 | 6432 |
| 6463 #undef __ | 6433 #undef __ |
| 6464 | 6434 |
| 6465 #endif // defined TARGET_ARCH_X64 | 6435 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |