| Index: runtime/vm/intermediate_language.h
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.h (revision 13286)
|
| +++ runtime/vm/intermediate_language.h (working copy)
|
| @@ -259,6 +259,7 @@
|
| M(UnboxInteger) \
|
| M(BoxInteger) \
|
| M(BinaryMintOp) \
|
| + M(ShiftMintOp) \
|
| M(UnaryMintOp) \
|
| M(CheckArrayBound) \
|
| M(Constraint) \
|
| @@ -516,6 +517,7 @@
|
| friend class UnboxDoubleInstr;
|
| friend class BinaryDoubleOpInstr;
|
| friend class BinaryMintOpInstr;
|
| + friend class ShiftMintOpInstr;
|
| friend class UnaryMintOpInstr;
|
| friend class MathSqrtInstr;
|
| friend class CheckClassInstr;
|
| @@ -3584,6 +3586,65 @@
|
| };
|
|
|
|
|
| +class ShiftMintOpInstr : public TemplateDefinition<2> {
|
| + public:
|
| + ShiftMintOpInstr(Token::Kind op_kind,
|
| + Value* left,
|
| + Value* right,
|
| + InstanceCallInstr* instance_call)
|
| + : op_kind_(op_kind) {
|
| + ASSERT(left != NULL);
|
| + ASSERT(right != NULL);
|
| + ASSERT(op_kind == Token::kSHR);
|
| + inputs_[0] = left;
|
| + inputs_[1] = right;
|
| + deopt_id_ = instance_call->deopt_id();
|
| + }
|
| +
|
| + Value* left() const { return inputs_[0]; }
|
| + Value* right() const { return inputs_[1]; }
|
| +
|
| + Token::Kind op_kind() const { return op_kind_; }
|
| +
|
| + virtual void PrintOperandsTo(BufferFormatter* f) const;
|
| +
|
| + virtual bool CanDeoptimize() const { return true; }
|
| +
|
| + virtual bool HasSideEffect() const { return false; }
|
| +
|
| + virtual bool AffectedBySideEffect() const { return false; }
|
| +
|
| + virtual bool AttributesEqual(Instruction* other) const {
|
| + return op_kind() == other->AsShiftMintOp()->op_kind();
|
| + }
|
| +
|
| + virtual intptr_t ResultCid() const;
|
| + virtual RawAbstractType* CompileType() const;
|
| +
|
| + virtual Representation representation() const {
|
| + return kUnboxedMint;
|
| + }
|
| +
|
| + virtual Representation RequiredInputRepresentation(intptr_t idx) const {
|
| + ASSERT((idx == 0) || (idx == 1));
|
| + return (idx == 0) ? kUnboxedMint : kTagged;
|
| + }
|
| +
|
| + virtual intptr_t DeoptimizationTarget() const {
|
| + // Direct access since this instuction cannot deoptimize, and the deopt-id
|
| + // was inherited from another instuction that could deoptimize.
|
| + return deopt_id_;
|
| + }
|
| +
|
| + DECLARE_INSTRUCTION(ShiftMintOp)
|
| +
|
| + private:
|
| + const Token::Kind op_kind_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ShiftMintOpInstr);
|
| +};
|
| +
|
| +
|
| class UnaryMintOpInstr : public TemplateDefinition<1> {
|
| public:
|
| UnaryMintOpInstr(Token::Kind op_kind,
|
|
|