Index: src/compiler/js-operator.h |
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h |
index b9902931fc88aa56a92ae12aeccd76581ee30dbe..6088a9033a2c17f47fc1466bfc0dde51925dccc3 100644 |
--- a/src/compiler/js-operator.h |
+++ b/src/compiler/js-operator.h |
@@ -489,6 +489,31 @@ std::ostream& operator<<(std::ostream&, CreateLiteralParameters const&); |
const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op); |
+enum class SuspendType { kYield, kAwait }; |
+class GeneratorStoreParameters final { |
+ public: |
+ GeneratorStoreParameters(int register_count, SuspendType suspend_type) |
+ : register_count_(register_count), suspend_type_(suspend_type) {} |
+ |
+ int register_count() const { return register_count_; } |
+ SuspendType suspend_type() const { return suspend_type_; } |
+ |
+ private: |
+ int register_count_; |
+ SuspendType suspend_type_; |
+}; |
+ |
+bool operator==(GeneratorStoreParameters const&, |
+ GeneratorStoreParameters const&); |
+bool operator!=(GeneratorStoreParameters const&, |
+ GeneratorStoreParameters const&); |
+ |
+size_t hash_value(GeneratorStoreParameters const&); |
+ |
+std::ostream& operator<<(std::ostream&, GeneratorStoreParameters const&); |
+ |
+const GeneratorStoreParameters& GeneratorStoreParametersOf(const Operator* op); |
+ |
BinaryOperationHint BinaryOperationHintOf(const Operator* op); |
CompareOperationHint CompareOperationHintOf(const Operator* op); |
@@ -600,8 +625,8 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final |
const Operator* LoadMessage(); |
const Operator* StoreMessage(); |
- // Used to implement Ignition's SuspendGenerator bytecode. |
- const Operator* GeneratorStore(int register_count); |
+ // Used to implement Ignition's SuspendGenerator / AwaitGenerator bytecode. |
+ const Operator* GeneratorStore(int register_count, SuspendType suspend_type); |
// Used to implement Ignition's ResumeGenerator bytecode. |
const Operator* GeneratorRestoreContinuation(); |