Chromium Code Reviews| Index: runtime/vm/intermediate_language.h |
| =================================================================== |
| --- runtime/vm/intermediate_language.h (revision 28647) |
| +++ runtime/vm/intermediate_language.h (working copy) |
| @@ -302,6 +302,9 @@ |
| // Create non-nullable Int type. |
| static CompileType Int(); |
| + // Create non-nullable String type. |
| + static CompileType String(); |
| + |
| // Perform a join operation over the type lattice. |
| void Union(CompileType* other); |
| @@ -650,6 +653,7 @@ |
| M(CheckArrayBound) \ |
| M(Constraint) \ |
| M(StringFromCharCode) \ |
| + M(StringInterpolate) \ |
| M(InvokeMathCFunction) \ |
| M(GuardField) \ |
| M(IfThenElse) \ |
| @@ -3649,6 +3653,36 @@ |
| }; |
| +class StringInterpolateInstr : public TemplateDefinition<1> { |
| + public: |
| + StringInterpolateInstr(Value* value, intptr_t token_pos) |
| + : token_pos_(token_pos), function_(Function::Handle()) { |
| + SetInputAt(0, value); |
| + } |
| + |
| + Value* value() const { return inputs_[0]; } |
| + intptr_t token_pos() const { return token_pos_; } |
| + virtual bool CanDeoptimize() const { return true; } |
|
Kevin Millikin (Google)
2013/10/16 15:14:03
Really?
srdjan
2013/10/16 17:46:37
Offline discsussion: adapt Effects, CanDeoptimize,
|
| + virtual EffectSet Effects() const { return EffectSet::None(); } |
| + virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| + |
| + virtual CompileType ComputeType() const; |
| + // Calls toString on objects, which could throw exceptions |
| + virtual bool MayThrow() const { return true; } |
| + virtual bool AllowsCSE() const { return true; } |
| + |
| + const Function& CallFunction() const; |
| + |
| + DECLARE_INSTRUCTION(StringInterpolate) |
| + |
| + private: |
| + const intptr_t token_pos_; |
| + Function& function_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(StringInterpolateInstr); |
| +}; |
| + |
| + |
| class StoreIndexedInstr : public TemplateDefinition<3> { |
| public: |
| StoreIndexedInstr(Value* array, |