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

Unified Diff: src/ast/ast.h

Issue 2124813002: [debugger] omit exception events for rethrown exceptions in async. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 4 years, 5 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 | « no previous file | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index 0ae2b6fd34fe37c0982d3b032291b64232e114ee..e350a284cb090dbd8d4b4cf4d21deffc4911f794 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -2511,8 +2511,13 @@ class Yield final : public Expression {
public:
DECLARE_NODE_TYPE(Yield)
+ enum OnException { kOnExceptionThrow, kOnExceptionRethrow };
+
Expression* generator_object() const { return generator_object_; }
Expression* expression() const { return expression_; }
+ bool rethrow_on_exception() const {
+ return on_exception_ == kOnExceptionRethrow;
+ }
int yield_id() const { return yield_id_; }
void set_generator_object(Expression* e) { generator_object_ = e; }
@@ -2521,15 +2526,17 @@ class Yield final : public Expression {
protected:
Yield(Zone* zone, Expression* generator_object, Expression* expression,
- int pos)
+ int pos, OnException on_exception)
: Expression(zone, pos),
generator_object_(generator_object),
expression_(expression),
+ on_exception_(on_exception),
yield_id_(-1) {}
private:
Expression* generator_object_;
Expression* expression_;
+ OnException on_exception_;
int yield_id_;
};
@@ -3399,12 +3406,11 @@ class AstNodeFactory final BASE_EMBEDDED {
return assign;
}
- Yield* NewYield(Expression *generator_object,
- Expression* expression,
- int pos) {
+ Yield* NewYield(Expression* generator_object, Expression* expression, int pos,
+ Yield::OnException on_exception) {
if (!expression) expression = NewUndefinedLiteral(pos);
return new (local_zone_)
- Yield(local_zone_, generator_object, expression, pos);
+ Yield(local_zone_, generator_object, expression, pos, on_exception);
}
Throw* NewThrow(Expression* exception, int pos) {
« no previous file with comments | « no previous file | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698