| 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 2819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2830 && (emit_store_barrier_ == kEmitStoreBarrier); | 2830 && (emit_store_barrier_ == kEmitStoreBarrier); |
| 2831 } | 2831 } |
| 2832 | 2832 |
| 2833 virtual void PrintOperandsTo(BufferFormatter* f) const; | 2833 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 2834 | 2834 |
| 2835 virtual bool CanDeoptimize() const { return false; } | 2835 virtual bool CanDeoptimize() const { return false; } |
| 2836 | 2836 |
| 2837 virtual bool HasSideEffect() const { return true; } | 2837 virtual bool HasSideEffect() const { return true; } |
| 2838 | 2838 |
| 2839 private: | 2839 private: |
| 2840 bool CanValueBeSmi() const { |
| 2841 const intptr_t cid = value()->Type()->ToNullableCid(); |
| 2842 // Write barrier is skipped for nullable and non-nullable smis. |
| 2843 ASSERT(cid != kSmiCid); |
| 2844 return (cid == kDynamicCid); |
| 2845 } |
| 2846 |
| 2840 const Field& field_; | 2847 const Field& field_; |
| 2841 const StoreBarrierType emit_store_barrier_; | 2848 const StoreBarrierType emit_store_barrier_; |
| 2842 | 2849 |
| 2843 DISALLOW_COPY_AND_ASSIGN(StoreInstanceFieldInstr); | 2850 DISALLOW_COPY_AND_ASSIGN(StoreInstanceFieldInstr); |
| 2844 }; | 2851 }; |
| 2845 | 2852 |
| 2846 | 2853 |
| 2847 class GuardFieldInstr : public TemplateInstruction<1> { | 2854 class GuardFieldInstr : public TemplateInstruction<1> { |
| 2848 public: | 2855 public: |
| 2849 GuardFieldInstr(Value* value, | 2856 GuardFieldInstr(Value* value, |
| (...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4668 ForwardInstructionIterator* current_iterator_; | 4675 ForwardInstructionIterator* current_iterator_; |
| 4669 | 4676 |
| 4670 private: | 4677 private: |
| 4671 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 4678 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 4672 }; | 4679 }; |
| 4673 | 4680 |
| 4674 | 4681 |
| 4675 } // namespace dart | 4682 } // namespace dart |
| 4676 | 4683 |
| 4677 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 4684 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |