| 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/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/constant_propagator.h" | 8 #include "vm/constant_propagator.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 3490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3501 for (intptr_t i = 0; i < inputs_->length(); ++i) { | 3501 for (intptr_t i = 0; i < inputs_->length(); ++i) { |
| 3502 ASSERT((*inputs)[i] != NULL); | 3502 ASSERT((*inputs)[i] != NULL); |
| 3503 (*inputs)[i]->set_instruction(this); | 3503 (*inputs)[i]->set_instruction(this); |
| 3504 (*inputs)[i]->set_use_index(i); | 3504 (*inputs)[i]->set_use_index(i); |
| 3505 } | 3505 } |
| 3506 } | 3506 } |
| 3507 | 3507 |
| 3508 | 3508 |
| 3509 intptr_t MergedMathInstr::OutputIndexOf(intptr_t kind) { | 3509 intptr_t MergedMathInstr::OutputIndexOf(intptr_t kind) { |
| 3510 switch (kind) { | 3510 switch (kind) { |
| 3511 case MethodRecognizer::kMathSin: return 1; | 3511 case MathUnaryInstr::kSin: return 1; |
| 3512 case MethodRecognizer::kMathCos: return 0; | 3512 case MathUnaryInstr::kCos: return 0; |
| 3513 default: UNIMPLEMENTED(); return -1; | 3513 default: UNIMPLEMENTED(); return -1; |
| 3514 } | 3514 } |
| 3515 } | 3515 } |
| 3516 | 3516 |
| 3517 | 3517 |
| 3518 intptr_t MergedMathInstr::OutputIndexOf(Token::Kind token) { | 3518 intptr_t MergedMathInstr::OutputIndexOf(Token::Kind token) { |
| 3519 switch (token) { | 3519 switch (token) { |
| 3520 case Token::kTRUNCDIV: return 0; | 3520 case Token::kTRUNCDIV: return 0; |
| 3521 case Token::kMOD: return 1; | 3521 case Token::kMOD: return 1; |
| 3522 default: UNIMPLEMENTED(); return -1; | 3522 default: UNIMPLEMENTED(); return -1; |
| 3523 } | 3523 } |
| 3524 } | 3524 } |
| 3525 | 3525 |
| 3526 | 3526 |
| 3527 #undef __ | 3527 #undef __ |
| 3528 | 3528 |
| 3529 } // namespace dart | 3529 } // namespace dart |
| OLD | NEW |