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

Unified Diff: src/interpreter/bytecode-generator.h

Issue 2654423004: [async-functions] support await expressions in finally statements (Closed)
Patch Set: I'd like to build with -Wunused-variables locally, but how!? 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/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.h
diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h
index f15829dea82514ca6f8fb7ebbebbcd16e3afdaa7..51111b443d27562b4ac00e3f5bc2ac99ec66675a 100644
--- a/src/interpreter/bytecode-generator.h
+++ b/src/interpreter/bytecode-generator.h
@@ -164,6 +164,27 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
void VisitForTest(Expression* expr, BytecodeLabels* then_labels,
BytecodeLabels* else_labels, TestFallthrough fallthrough);
+ void BuildYield(int yield_id, Yield::OnException on_exception, Register value,
+ int position);
+ void BuildAwait(int yield_id, Yield::OnException on_exception, Register value,
+ int position);
+ void BuildYieldResumePoint(int yield_id, Yield::OnException on_exception,
+ int position);
+
+ void BuildTryCatch(HandlerTable::CatchPrediction catch_prediction,
+ std::function<void()> build_try,
+ std::function<void(Register context)> build_catch);
+ void BuildTryFinally(std::function<void()> build_try,
+ std::function<void()> build_finally);
+ void BuildTryCatchFinally(HandlerTable::CatchPrediction catch_prediction,
+ std::function<void()> build_try,
+ std::function<void(Register context)> build_catch,
+ std::function<void()> build_finally);
+
+ // If FLAG_trace is enabled, invoke Runtime::kTraceExit with the return value
+ // in the accumulator. The return value is restored on exit.
+ void BuildTraceExit();
+
// Returns the runtime function id for a store to super for the function's
// language mode.
inline Runtime::FunctionId StoreToSuperRuntimeId();
@@ -219,7 +240,10 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
ZoneVector<BytecodeLabel> generator_resume_points_;
Register generator_state_;
+ Register generator_object_;
+ Register promise_;
int loop_depth_;
+ HandlerTable::CatchPrediction catch_prediction_;
Handle<Name> home_object_symbol_;
Handle<Name> iterator_symbol_;
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698