| 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 5082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5093 IsShiftMintOp() || | 5093 IsShiftMintOp() || |
| 5094 IsBoxInt64() || | 5094 IsBoxInt64() || |
| 5095 IsUnboxInt64(); | 5095 IsUnboxInt64(); |
| 5096 } | 5096 } |
| 5097 | 5097 |
| 5098 | 5098 |
| 5099 class MathUnaryInstr : public TemplateDefinition<1, NoThrow, Pure> { | 5099 class MathUnaryInstr : public TemplateDefinition<1, NoThrow, Pure> { |
| 5100 public: | 5100 public: |
| 5101 enum MathUnaryKind { | 5101 enum MathUnaryKind { |
| 5102 kIllegal, | 5102 kIllegal, |
| 5103 kSin, | |
| 5104 kCos, | |
| 5105 kSqrt, | 5103 kSqrt, |
| 5106 kDoubleSquare, | 5104 kDoubleSquare, |
| 5107 }; | 5105 }; |
| 5108 MathUnaryInstr(MathUnaryKind kind, Value* value, intptr_t deopt_id) | 5106 MathUnaryInstr(MathUnaryKind kind, Value* value, intptr_t deopt_id) |
| 5109 : TemplateDefinition(deopt_id), kind_(kind) { | 5107 : TemplateDefinition(deopt_id), kind_(kind) { |
| 5110 SetInputAt(0, value); | 5108 SetInputAt(0, value); |
| 5111 } | 5109 } |
| 5112 | 5110 |
| 5113 Value* value() const { return inputs_[0]; } | 5111 Value* value() const { return inputs_[0]; } |
| 5114 MathUnaryKind kind() const { return kind_; } | 5112 MathUnaryKind kind() const { return kind_; } |
| 5115 const RuntimeEntry& TargetFunction() const; | |
| 5116 | 5113 |
| 5117 virtual bool CanDeoptimize() const { return false; } | 5114 virtual bool CanDeoptimize() const { return false; } |
| 5118 | 5115 |
| 5119 virtual Representation representation() const { | 5116 virtual Representation representation() const { |
| 5120 return kUnboxedDouble; | 5117 return kUnboxedDouble; |
| 5121 } | 5118 } |
| 5122 | 5119 |
| 5123 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5120 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5124 ASSERT(idx == 0); | 5121 ASSERT(idx == 0); |
| 5125 return kUnboxedDouble; | 5122 return kUnboxedDouble; |
| (...skipping 2561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7687 } | 7684 } |
| 7688 | 7685 |
| 7689 MergedMathInstr::Kind kind() const { return kind_; } | 7686 MergedMathInstr::Kind kind() const { return kind_; } |
| 7690 | 7687 |
| 7691 virtual intptr_t InputCount() const { return inputs_->length(); } | 7688 virtual intptr_t InputCount() const { return inputs_->length(); } |
| 7692 | 7689 |
| 7693 virtual Value* InputAt(intptr_t i) const { | 7690 virtual Value* InputAt(intptr_t i) const { |
| 7694 return (*inputs_)[i]; | 7691 return (*inputs_)[i]; |
| 7695 } | 7692 } |
| 7696 | 7693 |
| 7697 static intptr_t OutputIndexOf(intptr_t kind); | 7694 static intptr_t OutputIndexOf(MethodRecognizer::Kind kind); |
| 7698 static intptr_t OutputIndexOf(Token::Kind token); | 7695 static intptr_t OutputIndexOf(Token::Kind token); |
| 7699 | 7696 |
| 7700 virtual CompileType ComputeType() const; | 7697 virtual CompileType ComputeType() const; |
| 7701 | 7698 |
| 7702 virtual bool CanDeoptimize() const { | 7699 virtual bool CanDeoptimize() const { |
| 7703 if (kind_ == kTruncDivMod) { | 7700 if (kind_ == kTruncDivMod) { |
| 7704 return true; | 7701 return true; |
| 7705 } else if (kind_ == kSinCos) { | 7702 } else if (kind_ == kSinCos) { |
| 7706 return false; | 7703 return false; |
| 7707 } else { | 7704 } else { |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8310 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8307 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8311 UNIMPLEMENTED(); \ | 8308 UNIMPLEMENTED(); \ |
| 8312 return NULL; \ | 8309 return NULL; \ |
| 8313 } \ | 8310 } \ |
| 8314 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8311 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8315 | 8312 |
| 8316 | 8313 |
| 8317 } // namespace dart | 8314 } // namespace dart |
| 8318 | 8315 |
| 8319 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8316 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |