| 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 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
| 6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2414 Value* left() const { return inputs_[0]; } | 2414 Value* left() const { return inputs_[0]; } |
| 2415 Value* right() const { return inputs_[1]; } | 2415 Value* right() const { return inputs_[1]; } |
| 2416 | 2416 |
| 2417 virtual ComparisonInstr* AsComparison() { return this; } | 2417 virtual ComparisonInstr* AsComparison() { return this; } |
| 2418 | 2418 |
| 2419 Token::Kind kind() const { return kind_; } | 2419 Token::Kind kind() const { return kind_; } |
| 2420 | 2420 |
| 2421 virtual void EmitBranchCode(FlowGraphCompiler* compiler, | 2421 virtual void EmitBranchCode(FlowGraphCompiler* compiler, |
| 2422 BranchInstr* branch) = 0; | 2422 BranchInstr* branch) = 0; |
| 2423 | 2423 |
| 2424 private: | 2424 protected: |
| 2425 Token::Kind kind_; | 2425 Token::Kind kind_; |
| 2426 }; | 2426 }; |
| 2427 | 2427 |
| 2428 | 2428 |
| 2429 // Inlined functions from class BranchInstr that forward to their comparison. | 2429 // Inlined functions from class BranchInstr that forward to their comparison. |
| 2430 inline intptr_t BranchInstr::ArgumentCount() const { | 2430 inline intptr_t BranchInstr::ArgumentCount() const { |
| 2431 return comparison()->ArgumentCount(); | 2431 return comparison()->ArgumentCount(); |
| 2432 } | 2432 } |
| 2433 | 2433 |
| 2434 | 2434 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2492 virtual bool AttributesEqual(Instruction* other) const; | 2492 virtual bool AttributesEqual(Instruction* other) const; |
| 2493 virtual bool AffectedBySideEffect() const { return false; } | 2493 virtual bool AffectedBySideEffect() const { return false; } |
| 2494 | 2494 |
| 2495 virtual Definition* Canonicalize(FlowGraphOptimizer* optimizer); | 2495 virtual Definition* Canonicalize(FlowGraphOptimizer* optimizer); |
| 2496 | 2496 |
| 2497 virtual void EmitBranchCode(FlowGraphCompiler* compiler, | 2497 virtual void EmitBranchCode(FlowGraphCompiler* compiler, |
| 2498 BranchInstr* branch); | 2498 BranchInstr* branch); |
| 2499 | 2499 |
| 2500 bool needs_number_check() const { return needs_number_check_; } | 2500 bool needs_number_check() const { return needs_number_check_; } |
| 2501 void set_needs_number_check(bool value) { needs_number_check_ = value; } | 2501 void set_needs_number_check(bool value) { needs_number_check_ = value; } |
| 2502 void set_kind(Token::Kind value) { kind_ = value; } |
| 2502 | 2503 |
| 2503 private: | 2504 private: |
| 2504 // True if the comparison must check for double, Mint or Bigint and | 2505 // True if the comparison must check for double, Mint or Bigint and |
| 2505 // use value comparison instead. | 2506 // use value comparison instead. |
| 2506 bool needs_number_check_; | 2507 bool needs_number_check_; |
| 2507 | 2508 |
| 2508 DISALLOW_COPY_AND_ASSIGN(StrictCompareInstr); | 2509 DISALLOW_COPY_AND_ASSIGN(StrictCompareInstr); |
| 2509 }; | 2510 }; |
| 2510 | 2511 |
| 2511 | 2512 |
| (...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4675 ForwardInstructionIterator* current_iterator_; | 4676 ForwardInstructionIterator* current_iterator_; |
| 4676 | 4677 |
| 4677 private: | 4678 private: |
| 4678 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 4679 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 4679 }; | 4680 }; |
| 4680 | 4681 |
| 4681 | 4682 |
| 4682 } // namespace dart | 4683 } // namespace dart |
| 4683 | 4684 |
| 4684 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 4685 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |