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 4988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4999 } | 4999 } |
5000 | 5000 |
5001 | 5001 |
5002 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5002 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5003 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 5003 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
5004 kDeoptPolymorphicInstanceCallTestFail); | 5004 kDeoptPolymorphicInstanceCallTestFail); |
5005 if (ic_data().NumberOfChecks() == 0) { | 5005 if (ic_data().NumberOfChecks() == 0) { |
5006 __ jmp(deopt); | 5006 __ jmp(deopt); |
5007 return; | 5007 return; |
5008 } | 5008 } |
5009 ASSERT(ic_data().num_args_tested() == 1); | 5009 ASSERT(ic_data().NumArgsTested() == 1); |
5010 if (!with_checks()) { | 5010 if (!with_checks()) { |
5011 ASSERT(ic_data().HasOneTarget()); | 5011 ASSERT(ic_data().HasOneTarget()); |
5012 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); | 5012 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); |
5013 compiler->GenerateStaticCall(deopt_id(), | 5013 compiler->GenerateStaticCall(deopt_id(), |
5014 instance_call()->token_pos(), | 5014 instance_call()->token_pos(), |
5015 target, | 5015 target, |
5016 instance_call()->ArgumentCount(), | 5016 instance_call()->ArgumentCount(), |
5017 instance_call()->argument_names(), | 5017 instance_call()->argument_names(), |
5018 locs()); | 5018 locs()); |
5019 return; | 5019 return; |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5498 PcDescriptors::kOther, | 5498 PcDescriptors::kOther, |
5499 locs()); | 5499 locs()); |
5500 __ Drop(ArgumentCount()); // Discard arguments. | 5500 __ Drop(ArgumentCount()); // Discard arguments. |
5501 } | 5501 } |
5502 | 5502 |
5503 } // namespace dart | 5503 } // namespace dart |
5504 | 5504 |
5505 #undef __ | 5505 #undef __ |
5506 | 5506 |
5507 #endif // defined TARGET_ARCH_X64 | 5507 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |