Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Unified Diff: src/hydrogen-instructions.h

Issue 1108313003: Add HArrayBufferNotNeutered instruction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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*);
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | src/x64/lithium-codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698