| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 2977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2988 public: | 2988 public: |
| 2989 UnboxDoubleInstr(Value* value, intptr_t deopt_id) { | 2989 UnboxDoubleInstr(Value* value, intptr_t deopt_id) { |
| 2990 ASSERT(value != NULL); | 2990 ASSERT(value != NULL); |
| 2991 inputs_[0] = value; | 2991 inputs_[0] = value; |
| 2992 deopt_id_ = deopt_id; | 2992 deopt_id_ = deopt_id; |
| 2993 } | 2993 } |
| 2994 | 2994 |
| 2995 Value* value() const { return inputs_[0]; } | 2995 Value* value() const { return inputs_[0]; } |
| 2996 | 2996 |
| 2997 virtual bool CanDeoptimize() const { | 2997 virtual bool CanDeoptimize() const { |
| 2998 return value()->ResultCid() != kDoubleCid; | 2998 return (value()->ResultCid() != kDoubleCid) |
| 2999 && (value()->ResultCid() != kSmiCid); |
| 2999 } | 3000 } |
| 3000 | 3001 |
| 3001 virtual bool HasSideEffect() const { return false; } | 3002 virtual bool HasSideEffect() const { return false; } |
| 3002 | 3003 |
| 3003 // The output is not an instance but when it is boxed it becomes double. | 3004 // The output is not an instance but when it is boxed it becomes double. |
| 3004 virtual intptr_t ResultCid() const { return kDoubleCid; } | 3005 virtual intptr_t ResultCid() const { return kDoubleCid; } |
| 3005 | 3006 |
| 3006 virtual Representation representation() const { | 3007 virtual Representation representation() const { |
| 3007 return kUnboxedDouble; | 3008 return kUnboxedDouble; |
| 3008 } | 3009 } |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3641 ForwardInstructionIterator* current_iterator_; | 3642 ForwardInstructionIterator* current_iterator_; |
| 3642 | 3643 |
| 3643 private: | 3644 private: |
| 3644 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 3645 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 3645 }; | 3646 }; |
| 3646 | 3647 |
| 3647 | 3648 |
| 3648 } // namespace dart | 3649 } // namespace dart |
| 3649 | 3650 |
| 3650 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 3651 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |