| 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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 2392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2403 call_ic_data = &ICData::ZoneHandle(ic_data()->raw()); | 2403 call_ic_data = &ICData::ZoneHandle(ic_data()->raw()); |
| 2404 } | 2404 } |
| 2405 if (compiler->is_optimizing()) { | 2405 if (compiler->is_optimizing()) { |
| 2406 ASSERT(HasICData()); | 2406 ASSERT(HasICData()); |
| 2407 if (ic_data()->NumberOfChecks() > 0) { | 2407 if (ic_data()->NumberOfChecks() > 0) { |
| 2408 const ICData& unary_ic_data = | 2408 const ICData& unary_ic_data = |
| 2409 ICData::ZoneHandle(ic_data()->AsUnaryClassChecks()); | 2409 ICData::ZoneHandle(ic_data()->AsUnaryClassChecks()); |
| 2410 compiler->GenerateInstanceCall(deopt_id(), | 2410 compiler->GenerateInstanceCall(deopt_id(), |
| 2411 token_pos(), | 2411 token_pos(), |
| 2412 ArgumentCount(), | 2412 ArgumentCount(), |
| 2413 argument_names(), | |
| 2414 locs(), | 2413 locs(), |
| 2415 unary_ic_data); | 2414 unary_ic_data); |
| 2416 } else { | 2415 } else { |
| 2417 // Call was not visited yet, use original ICData in order to populate it. | 2416 // Call was not visited yet, use original ICData in order to populate it. |
| 2418 compiler->GenerateInstanceCall(deopt_id(), | 2417 compiler->GenerateInstanceCall(deopt_id(), |
| 2419 token_pos(), | 2418 token_pos(), |
| 2420 ArgumentCount(), | 2419 ArgumentCount(), |
| 2421 argument_names(), | |
| 2422 locs(), | 2420 locs(), |
| 2423 *call_ic_data); | 2421 *call_ic_data); |
| 2424 } | 2422 } |
| 2425 } else { | 2423 } else { |
| 2426 // Unoptimized code. | 2424 // Unoptimized code. |
| 2427 ASSERT(!HasICData()); | 2425 ASSERT(!HasICData()); |
| 2428 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, | 2426 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, |
| 2429 deopt_id(), | 2427 deopt_id(), |
| 2430 token_pos()); | 2428 token_pos()); |
| 2431 compiler->GenerateInstanceCall(deopt_id(), | 2429 compiler->GenerateInstanceCall(deopt_id(), |
| 2432 token_pos(), | 2430 token_pos(), |
| 2433 ArgumentCount(), | 2431 ArgumentCount(), |
| 2434 argument_names(), | |
| 2435 locs(), | 2432 locs(), |
| 2436 *call_ic_data); | 2433 *call_ic_data); |
| 2437 } | 2434 } |
| 2438 } | 2435 } |
| 2439 | 2436 |
| 2440 | 2437 |
| 2441 bool PolymorphicInstanceCallInstr::HasSingleRecognizedTarget() const { | 2438 bool PolymorphicInstanceCallInstr::HasSingleRecognizedTarget() const { |
| 2442 return ic_data().HasOneTarget() && | 2439 return ic_data().HasOneTarget() && |
| 2443 (MethodRecognizer::RecognizeKind( | 2440 (MethodRecognizer::RecognizeKind( |
| 2444 Function::Handle(ic_data().GetTargetAt(0))) != | 2441 Function::Handle(ic_data().GetTargetAt(0))) != |
| (...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4109 case Token::kTRUNCDIV: return 0; | 4106 case Token::kTRUNCDIV: return 0; |
| 4110 case Token::kMOD: return 1; | 4107 case Token::kMOD: return 1; |
| 4111 default: UNIMPLEMENTED(); return -1; | 4108 default: UNIMPLEMENTED(); return -1; |
| 4112 } | 4109 } |
| 4113 } | 4110 } |
| 4114 | 4111 |
| 4115 | 4112 |
| 4116 #undef __ | 4113 #undef __ |
| 4117 | 4114 |
| 4118 } // namespace dart | 4115 } // namespace dart |
| OLD | NEW |