Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 71fc0f99a1870eebd38d0e8e5015430fd6b367d2..771197d514473b55b9881f7d05dcf7c2c333df5e 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -70,6 +70,7 @@ class LChunkBuilder; |
V(CallStub) \ |
V(CapturedObject) \ |
V(Change) \ |
+ V(CheckArrayBufferNotNeutered) \ |
V(CheckHeapObject) \ |
V(CheckInstanceType) \ |
V(CheckMaps) \ |
@@ -2952,6 +2953,36 @@ class HCheckSmi final : public HUnaryOperation { |
}; |
+class HCheckArrayBufferNotNeutered final : public HUnaryOperation { |
+ public: |
+ DECLARE_INSTRUCTION_FACTORY_P1(HCheckArrayBufferNotNeutered, HValue*); |
+ |
+ bool HasEscapingOperandAt(int index) override { return false; } |
+ Representation RequiredInputRepresentation(int index) override { |
+ return Representation::Tagged(); |
+ } |
+ |
+ HType CalculateInferredType() override { |
+ if (value()->type().IsHeapObject()) return value()->type(); |
+ return HType::HeapObject(); |
+ } |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(CheckArrayBufferNotNeutered) |
+ |
+ protected: |
+ bool DataEquals(HValue* other) override { return true; } |
+ int RedefinedOperandIndex() override { return 0; } |
+ |
+ private: |
+ explicit HCheckArrayBufferNotNeutered(HValue* value) |
+ : HUnaryOperation(value) { |
+ set_representation(Representation::Tagged()); |
+ SetFlag(kUseGVN); |
+ SetDependsOnFlag(kCalls); |
+ } |
+}; |
+ |
+ |
class HCheckHeapObject final : public HUnaryOperation { |
public: |
DECLARE_INSTRUCTION_FACTORY_P1(HCheckHeapObject, HValue*); |