Chromium Code Reviews| Index: runtime/vm/intermediate_language.h |
| =================================================================== |
| --- runtime/vm/intermediate_language.h (revision 39313) |
| +++ runtime/vm/intermediate_language.h (working copy) |
| @@ -705,6 +705,7 @@ |
| M(LoadIndexed) \ |
| M(StoreIndexed) \ |
| M(StoreInstanceField) \ |
| + M(InitStaticField) \ |
| M(LoadStaticField) \ |
| M(StoreStaticField) \ |
| M(BooleanNegate) \ |
| @@ -4624,6 +4625,31 @@ |
| }; |
| +class InitStaticFieldInstr : public TemplateInstruction<1> { |
| + public: |
| + InitStaticFieldInstr(Value* input, const Field& field) |
| + : field_(field) { |
| + SetInputAt(0, input); |
| + } |
| + |
| + virtual intptr_t token_pos() const { return field_.token_pos(); } |
| + const Field& field() const { return field_; } |
| + |
| + DECLARE_INSTRUCTION(InitStaticField) |
| + |
| + virtual intptr_t ArgumentCount() const { return 0; } |
| + virtual bool CanDeoptimize() const { return true; } |
|
srdjan
2014/08/19 18:49:39
Why can it deoptimize?
hausner
2014/08/19 20:54:00
As discussed offline, the initializer expression c
|
| + virtual EffectSet Effects() const { return EffectSet::All(); } |
| + virtual bool MayThrow() const { return true; } |
| + virtual Instruction* Canonicalize(FlowGraph* flow_graph); |
| + |
| + private: |
| + const Field& field_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(InitStaticFieldInstr); |
| +}; |
| + |
| + |
| class AllocateUninitializedContextInstr : public TemplateDefinition<0> { |
| public: |
| AllocateUninitializedContextInstr(intptr_t token_pos, |