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

Unified Diff: src/compiler/js-operator.h

Issue 2622833002: WIP [esnext] implement async iteration proposal (Closed)
Patch Set: simplify AsyncIteratorValueUnwrap Created 3 years, 11 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
« no previous file with comments | « src/compiler/js-intrinsic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/compiler/js-intrinsic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698