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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(Constraint) \ | 515 M(Constraint) \ |
516 M(StringToCharCode) \ | 516 M(StringToCharCode) \ |
517 M(StringFromCharCode) \ | 517 M(OneByteStringFromCharCode) \ |
518 M(StringInterpolate) \ | 518 M(StringInterpolate) \ |
519 M(InvokeMathCFunction) \ | 519 M(InvokeMathCFunction) \ |
520 M(MergedMath) \ | 520 M(MergedMath) \ |
521 M(GuardFieldClass) \ | 521 M(GuardFieldClass) \ |
522 M(GuardFieldLength) \ | 522 M(GuardFieldLength) \ |
523 M(IfThenElse) \ | 523 M(IfThenElse) \ |
524 M(BinaryFloat32x4Op) \ | 524 M(BinaryFloat32x4Op) \ |
525 M(Simd32x4Shuffle) \ | 525 M(Simd32x4Shuffle) \ |
526 M(Simd32x4ShuffleMix) \ | 526 M(Simd32x4ShuffleMix) \ |
527 M(Simd32x4GetSignMask) \ | 527 M(Simd32x4GetSignMask) \ |
(...skipping 3394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3922 private: | 3922 private: |
3923 const intptr_t class_id_; | 3923 const intptr_t class_id_; |
3924 const TokenPosition token_pos_; | 3924 const TokenPosition token_pos_; |
3925 const intptr_t element_count_; | 3925 const intptr_t element_count_; |
3926 Representation representation_; | 3926 Representation representation_; |
3927 | 3927 |
3928 DISALLOW_COPY_AND_ASSIGN(LoadCodeUnitsInstr); | 3928 DISALLOW_COPY_AND_ASSIGN(LoadCodeUnitsInstr); |
3929 }; | 3929 }; |
3930 | 3930 |
3931 | 3931 |
3932 class StringFromCharCodeInstr : public TemplateDefinition<1, NoThrow, Pure> { | 3932 class OneByteStringFromCharCodeInstr |
| 3933 : public TemplateDefinition<1, NoThrow, Pure> { |
3933 public: | 3934 public: |
3934 StringFromCharCodeInstr(Value* char_code, intptr_t cid) : cid_(cid) { | 3935 explicit OneByteStringFromCharCodeInstr(Value* char_code) { |
3935 ASSERT(char_code != NULL); | |
3936 ASSERT(char_code->definition()->IsLoadIndexed()); | |
3937 ASSERT(char_code->definition()->AsLoadIndexed()->class_id() == | |
3938 kOneByteStringCid); | |
3939 SetInputAt(0, char_code); | 3936 SetInputAt(0, char_code); |
3940 } | 3937 } |
3941 | 3938 |
3942 DECLARE_INSTRUCTION(StringFromCharCode) | 3939 DECLARE_INSTRUCTION(OneByteStringFromCharCode) |
3943 virtual CompileType ComputeType() const; | 3940 virtual CompileType ComputeType() const; |
3944 | 3941 |
3945 Value* char_code() const { return inputs_[0]; } | 3942 Value* char_code() const { return inputs_[0]; } |
3946 | 3943 |
3947 virtual bool CanDeoptimize() const { return false; } | 3944 virtual bool CanDeoptimize() const { return false; } |
3948 | 3945 |
3949 virtual bool AttributesEqual(Instruction* other) const { | 3946 virtual bool AttributesEqual(Instruction* other) const { |
3950 return other->AsStringFromCharCode()->cid_ == cid_; | 3947 return true; |
3951 } | 3948 } |
3952 | 3949 |
3953 private: | 3950 private: |
3954 const intptr_t cid_; | 3951 DISALLOW_COPY_AND_ASSIGN(OneByteStringFromCharCodeInstr); |
3955 | |
3956 DISALLOW_COPY_AND_ASSIGN(StringFromCharCodeInstr); | |
3957 }; | 3952 }; |
3958 | 3953 |
3959 | 3954 |
3960 class StringToCharCodeInstr : public TemplateDefinition<1, NoThrow, Pure> { | 3955 class StringToCharCodeInstr : public TemplateDefinition<1, NoThrow, Pure> { |
3961 public: | 3956 public: |
3962 StringToCharCodeInstr(Value* str, intptr_t cid) : cid_(cid) { | 3957 StringToCharCodeInstr(Value* str, intptr_t cid) : cid_(cid) { |
3963 ASSERT(str != NULL); | 3958 ASSERT(str != NULL); |
3964 SetInputAt(0, str); | 3959 SetInputAt(0, str); |
3965 } | 3960 } |
3966 | 3961 |
(...skipping 4293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8260 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8255 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
8261 UNIMPLEMENTED(); \ | 8256 UNIMPLEMENTED(); \ |
8262 return NULL; \ | 8257 return NULL; \ |
8263 } \ | 8258 } \ |
8264 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8259 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8265 | 8260 |
8266 | 8261 |
8267 } // namespace dart | 8262 } // namespace dart |
8268 | 8263 |
8269 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8264 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |