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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 M(MathMinMax) \ | 505 M(MathMinMax) \ |
506 M(Box) \ | 506 M(Box) \ |
507 M(Unbox) \ | 507 M(Unbox) \ |
508 M(BoxInt64) \ | 508 M(BoxInt64) \ |
509 M(UnboxInt64) \ | 509 M(UnboxInt64) \ |
510 M(CaseInsensitiveCompareUC16) \ | 510 M(CaseInsensitiveCompareUC16) \ |
511 M(BinaryMintOp) \ | 511 M(BinaryMintOp) \ |
512 M(ShiftMintOp) \ | 512 M(ShiftMintOp) \ |
513 M(UnaryMintOp) \ | 513 M(UnaryMintOp) \ |
514 M(CheckArrayBound) \ | 514 M(CheckArrayBound) \ |
| 515 M(GenericCheckBound) \ |
515 M(Constraint) \ | 516 M(Constraint) \ |
516 M(StringToCharCode) \ | 517 M(StringToCharCode) \ |
517 M(OneByteStringFromCharCode) \ | 518 M(OneByteStringFromCharCode) \ |
518 M(StringInterpolate) \ | 519 M(StringInterpolate) \ |
519 M(InvokeMathCFunction) \ | 520 M(InvokeMathCFunction) \ |
520 M(MergedMath) \ | 521 M(MergedMath) \ |
521 M(GuardFieldClass) \ | 522 M(GuardFieldClass) \ |
522 M(GuardFieldLength) \ | 523 M(GuardFieldLength) \ |
523 M(IfThenElse) \ | 524 M(IfThenElse) \ |
524 M(BinaryFloat32x4Op) \ | 525 M(BinaryFloat32x4Op) \ |
(...skipping 7396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7921 }; | 7922 }; |
7922 | 7923 |
7923 private: | 7924 private: |
7924 bool generalized_; | 7925 bool generalized_; |
7925 bool licm_hoisted_; | 7926 bool licm_hoisted_; |
7926 | 7927 |
7927 DISALLOW_COPY_AND_ASSIGN(CheckArrayBoundInstr); | 7928 DISALLOW_COPY_AND_ASSIGN(CheckArrayBoundInstr); |
7928 }; | 7929 }; |
7929 | 7930 |
7930 | 7931 |
| 7932 class GenericCheckBoundInstr : public TemplateInstruction<2, Throws, NoCSE> { |
| 7933 public: |
| 7934 GenericCheckBoundInstr(Value* length, Value* index, intptr_t deopt_id) |
| 7935 : TemplateInstruction(deopt_id) { |
| 7936 SetInputAt(kLengthPos, length); |
| 7937 SetInputAt(kIndexPos, index); |
| 7938 } |
| 7939 |
| 7940 Value* length() const { return inputs_[kLengthPos]; } |
| 7941 Value* index() const { return inputs_[kIndexPos]; } |
| 7942 |
| 7943 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 7944 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 7945 |
| 7946 DECLARE_INSTRUCTION(GenericCheckBound) |
| 7947 |
| 7948 virtual bool CanDeoptimize() const { return true; } |
| 7949 |
| 7950 // Give a name to the location/input indices. |
| 7951 enum { |
| 7952 kLengthPos = 0, |
| 7953 kIndexPos = 1 |
| 7954 }; |
| 7955 |
| 7956 private: |
| 7957 DISALLOW_COPY_AND_ASSIGN(GenericCheckBoundInstr); |
| 7958 }; |
| 7959 |
| 7960 |
7931 class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> { | 7961 class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> { |
7932 public: | 7962 public: |
7933 UnboxedIntConverterInstr(Representation from, | 7963 UnboxedIntConverterInstr(Representation from, |
7934 Representation to, | 7964 Representation to, |
7935 Value* value, | 7965 Value* value, |
7936 intptr_t deopt_id) | 7966 intptr_t deopt_id) |
7937 : TemplateDefinition(deopt_id), | 7967 : TemplateDefinition(deopt_id), |
7938 from_representation_(from), | 7968 from_representation_(from), |
7939 to_representation_(to), | 7969 to_representation_(to), |
7940 is_truncating_(to == kUnboxedUint32) { | 7970 is_truncating_(to == kUnboxedUint32) { |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8283 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8313 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
8284 UNIMPLEMENTED(); \ | 8314 UNIMPLEMENTED(); \ |
8285 return NULL; \ | 8315 return NULL; \ |
8286 } \ | 8316 } \ |
8287 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8317 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8288 | 8318 |
8289 | 8319 |
8290 } // namespace dart | 8320 } // namespace dart |
8291 | 8321 |
8292 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8322 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |