| Index: runtime/vm/intermediate_language.h
|
| diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
|
| index bc2b3cfdbf0ce0d6457cb1245cf6f3e12f60e62b..d813c159bbdb6c281a840119c84b3d9882dfde15 100644
|
| --- a/runtime/vm/intermediate_language.h
|
| +++ b/runtime/vm/intermediate_language.h
|
| @@ -747,7 +747,8 @@ class EmbeddedArray<T, 0> {
|
| M(StringInterpolate) \
|
| M(InvokeMathCFunction) \
|
| M(MergedMath) \
|
| - M(GuardField) \
|
| + M(GuardFieldClass) \
|
| + M(GuardFieldLength) \
|
| M(IfThenElse) \
|
| M(BinaryFloat32x4Op) \
|
| M(Simd32x4Shuffle) \
|
| @@ -3815,23 +3816,22 @@ class GuardFieldInstr : public TemplateInstruction<1> {
|
|
|
| const Field& field() const { return field_; }
|
|
|
| - DECLARE_INSTRUCTION(GuardField)
|
| -
|
| virtual intptr_t ArgumentCount() const { return 0; }
|
|
|
| virtual bool CanDeoptimize() const { return true; }
|
| -
|
| - virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
| -
|
| - virtual void PrintOperandsTo(BufferFormatter* f) const;
|
| + virtual bool CanBecomeDeoptimizationTarget() const {
|
| + // Ensure that we record kDeopt PC descriptor in unoptimized code.
|
| + return true;
|
| + }
|
|
|
| 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;
|
|
|
| virtual bool MayThrow() const { return false; }
|
|
|
| + virtual void PrintOperandsTo(BufferFormatter* f) const;
|
| +
|
| private:
|
| const Field& field_;
|
|
|
| @@ -3839,6 +3839,42 @@ class GuardFieldInstr : public TemplateInstruction<1> {
|
| };
|
|
|
|
|
| +class GuardFieldClassInstr : public GuardFieldInstr {
|
| + public:
|
| + GuardFieldClassInstr(Value* value,
|
| + const Field& field,
|
| + intptr_t deopt_id)
|
| + : GuardFieldInstr(value, field, deopt_id) { }
|
| +
|
| + DECLARE_INSTRUCTION(GuardFieldClass)
|
| +
|
| + virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
| +
|
| + virtual bool AttributesEqual(Instruction* other) const;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(GuardFieldClassInstr);
|
| +};
|
| +
|
| +
|
| +class GuardFieldLengthInstr : public GuardFieldInstr {
|
| + public:
|
| + GuardFieldLengthInstr(Value* value,
|
| + const Field& field,
|
| + intptr_t deopt_id)
|
| + : GuardFieldInstr(value, field, deopt_id) { }
|
| +
|
| + DECLARE_INSTRUCTION(GuardFieldLength)
|
| +
|
| + virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
| +
|
| + virtual bool AttributesEqual(Instruction* other) const;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(GuardFieldLengthInstr);
|
| +};
|
| +
|
| +
|
| class LoadStaticFieldInstr : public TemplateDefinition<1> {
|
| public:
|
| explicit LoadStaticFieldInstr(Value* field_value) {
|
|
|