Index: dart/runtime/vm/intermediate_language.h |
=================================================================== |
--- dart/runtime/vm/intermediate_language.h (revision 31530) |
+++ dart/runtime/vm/intermediate_language.h (working copy) |
@@ -620,6 +620,7 @@ |
M(EqualityCompare) \ |
M(RelationalOp) \ |
M(NativeCall) \ |
+ M(DebugStepCheck) \ |
M(LoadIndexed) \ |
M(StoreIndexed) \ |
M(StoreInstanceField) \ |
@@ -669,6 +670,7 @@ |
M(UnaryMintOp) \ |
M(CheckArrayBound) \ |
M(Constraint) \ |
+ M(StringToCharCode) \ |
M(StringFromCharCode) \ |
M(StringInterpolate) \ |
M(InvokeMathCFunction) \ |
@@ -3415,6 +3417,28 @@ |
}; |
+class DebugStepCheckInstr : public TemplateInstruction<0> { |
+ public: |
+ explicit DebugStepCheckInstr(intptr_t token_pos) |
+ : token_pos_(token_pos) { |
+ } |
+ |
+ DECLARE_INSTRUCTION(DebugStepCheck) |
+ |
+ intptr_t token_pos() const { return token_pos_; } |
+ virtual bool MayThrow() const { return false; } |
+ virtual bool CanDeoptimize() const { return false; } |
+ virtual EffectSet Effects() const { return EffectSet::All(); } |
+ virtual intptr_t ArgumentCount() const { return 0; } |
+ virtual Instruction* Canonicalize(FlowGraph* flow_graph); |
+ |
+ private: |
+ const intptr_t token_pos_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DebugStepCheckInstr); |
+}; |
+ |
+ |
enum StoreBarrierType { |
kNoStoreBarrier, |
kEmitStoreBarrier |
@@ -3697,6 +3721,36 @@ |
}; |
+class StringToCharCodeInstr : public TemplateDefinition<1> { |
+ public: |
+ StringToCharCodeInstr(Value* str, intptr_t cid) : cid_(cid) { |
+ ASSERT(str != NULL); |
+ SetInputAt(0, str); |
+ } |
+ |
+ DECLARE_INSTRUCTION(StringToCharCode) |
+ virtual CompileType ComputeType() const; |
+ |
+ Value* str() const { return inputs_[0]; } |
+ |
+ virtual bool CanDeoptimize() const { return false; } |
+ |
+ virtual bool AllowsCSE() const { return true; } |
+ virtual EffectSet Effects() const { return EffectSet::None(); } |
+ virtual EffectSet Dependencies() const { return EffectSet::None(); } |
+ virtual bool AttributesEqual(Instruction* other) const { |
+ return other->AsStringToCharCode()->cid_ == cid_; |
+ } |
+ |
+ virtual bool MayThrow() const { return false; } |
+ |
+ private: |
+ const intptr_t cid_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(StringToCharCodeInstr); |
+}; |
+ |
+ |
class StringInterpolateInstr : public TemplateDefinition<1> { |
public: |
StringInterpolateInstr(Value* value, intptr_t token_pos) |