| 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 7918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7929 private: | 7929 private: |
| 7930 intptr_t cid_; | 7930 intptr_t cid_; |
| 7931 | 7931 |
| 7932 DISALLOW_COPY_AND_ASSIGN(CheckClassIdInstr); | 7932 DISALLOW_COPY_AND_ASSIGN(CheckClassIdInstr); |
| 7933 }; | 7933 }; |
| 7934 | 7934 |
| 7935 | 7935 |
| 7936 class CheckArrayBoundInstr : public TemplateInstruction<2> { | 7936 class CheckArrayBoundInstr : public TemplateInstruction<2> { |
| 7937 public: | 7937 public: |
| 7938 CheckArrayBoundInstr(Value* length, Value* index, intptr_t deopt_id) | 7938 CheckArrayBoundInstr(Value* length, Value* index, intptr_t deopt_id) |
| 7939 : generalized_(false) { | 7939 : generalized_(false), licm_hoisted_(false) { |
| 7940 SetInputAt(kLengthPos, length); | 7940 SetInputAt(kLengthPos, length); |
| 7941 SetInputAt(kIndexPos, index); | 7941 SetInputAt(kIndexPos, index); |
| 7942 // Override generated deopt-id. | 7942 // Override generated deopt-id. |
| 7943 deopt_id_ = deopt_id; | 7943 deopt_id_ = deopt_id; |
| 7944 } | 7944 } |
| 7945 | 7945 |
| 7946 Value* length() const { return inputs_[kLengthPos]; } | 7946 Value* length() const { return inputs_[kLengthPos]; } |
| 7947 Value* index() const { return inputs_[kIndexPos]; } | 7947 Value* index() const { return inputs_[kIndexPos]; } |
| 7948 | 7948 |
| 7949 DECLARE_INSTRUCTION(CheckArrayBound) | 7949 DECLARE_INSTRUCTION(CheckArrayBound) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 7965 | 7965 |
| 7966 static bool IsFixedLengthArrayType(intptr_t class_id); | 7966 static bool IsFixedLengthArrayType(intptr_t class_id); |
| 7967 | 7967 |
| 7968 virtual bool AllowsCSE() const { return true; } | 7968 virtual bool AllowsCSE() const { return true; } |
| 7969 virtual EffectSet Effects() const { return EffectSet::None(); } | 7969 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 7970 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 7970 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 7971 virtual bool AttributesEqual(Instruction* other) const { return true; } | 7971 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 7972 | 7972 |
| 7973 virtual bool MayThrow() const { return false; } | 7973 virtual bool MayThrow() const { return false; } |
| 7974 | 7974 |
| 7975 void set_licm_hoisted(bool value) { licm_hoisted_ = value; } |
| 7976 |
| 7975 // Give a name to the location/input indices. | 7977 // Give a name to the location/input indices. |
| 7976 enum { | 7978 enum { |
| 7977 kLengthPos = 0, | 7979 kLengthPos = 0, |
| 7978 kIndexPos = 1 | 7980 kIndexPos = 1 |
| 7979 }; | 7981 }; |
| 7980 | 7982 |
| 7981 private: | 7983 private: |
| 7982 bool generalized_; | 7984 bool generalized_; |
| 7985 bool licm_hoisted_; |
| 7983 | 7986 |
| 7984 DISALLOW_COPY_AND_ASSIGN(CheckArrayBoundInstr); | 7987 DISALLOW_COPY_AND_ASSIGN(CheckArrayBoundInstr); |
| 7985 }; | 7988 }; |
| 7986 | 7989 |
| 7987 | 7990 |
| 7988 class BoxIntNInstr : public TemplateDefinition<1> { | 7991 class BoxIntNInstr : public TemplateDefinition<1> { |
| 7989 public: | 7992 public: |
| 7990 BoxIntNInstr(Representation representation, Value* value) | 7993 BoxIntNInstr(Representation representation, Value* value) |
| 7991 : from_representation_(representation) { | 7994 : from_representation_(representation) { |
| 7992 SetInputAt(0, value); | 7995 SetInputAt(0, value); |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8446 Isolate* isolate, bool opt) const { \ | 8449 Isolate* isolate, bool opt) const { \ |
| 8447 UNIMPLEMENTED(); \ | 8450 UNIMPLEMENTED(); \ |
| 8448 return NULL; \ | 8451 return NULL; \ |
| 8449 } \ | 8452 } \ |
| 8450 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8453 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8451 | 8454 |
| 8452 | 8455 |
| 8453 } // namespace dart | 8456 } // namespace dart |
| 8454 | 8457 |
| 8455 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8458 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |