Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/torque/ast.h')
-rw-r--r--deps/v8/src/torque/ast.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/deps/v8/src/torque/ast.h b/deps/v8/src/torque/ast.h
index 93e0622aee2..76c047c7eec 100644
--- a/deps/v8/src/torque/ast.h
+++ b/deps/v8/src/torque/ast.h
@@ -93,7 +93,7 @@ namespace torque {
AST_STATEMENT_NODE_KIND_LIST(V) \
AST_DECLARATION_NODE_KIND_LIST(V) \
V(Identifier) \
- V(LabelBlock) \
+ V(TryHandler) \
V(ClassBody)
struct AstNode {
@@ -204,7 +204,7 @@ struct EnumDescription {
class Ast {
public:
- Ast() {}
+ Ast() = default;
std::vector<Declaration*>& declarations() { return declarations_; }
const std::vector<Declaration*>& declarations() const {
@@ -780,14 +780,17 @@ struct ForLoopStatement : Statement {
Statement* body;
};
-struct LabelBlock : AstNode {
- DEFINE_AST_NODE_LEAF_BOILERPLATE(LabelBlock)
- LabelBlock(SourcePosition pos, Identifier* label,
+struct TryHandler : AstNode {
+ DEFINE_AST_NODE_LEAF_BOILERPLATE(TryHandler)
+ enum class HandlerKind { kCatch, kLabel };
+ TryHandler(SourcePosition pos, HandlerKind handler_kind, Identifier* label,
const ParameterList& parameters, Statement* body)
: AstNode(kKind, pos),
+ handler_kind(handler_kind),
label(label),
parameters(parameters),
body(std::move(body)) {}
+ HandlerKind handler_kind;
Identifier* label;
ParameterList parameters;
Statement* body;
@@ -802,15 +805,13 @@ struct StatementExpression : Expression {
struct TryLabelExpression : Expression {
DEFINE_AST_NODE_LEAF_BOILERPLATE(TryLabelExpression)
- TryLabelExpression(SourcePosition pos, bool catch_exceptions,
- Expression* try_expression, LabelBlock* label_block)
+ TryLabelExpression(SourcePosition pos, Expression* try_expression,
+ TryHandler* label_block)
: Expression(kKind, pos),
- catch_exceptions(catch_exceptions),
try_expression(try_expression),
label_block(label_block) {}
- bool catch_exceptions;
Expression* try_expression;
- LabelBlock* label_block;
+ TryHandler* label_block;
};
struct BlockStatement : Statement {
@@ -1175,8 +1176,7 @@ struct ClassBody : AstNode {
struct ClassDeclaration : TypeDeclaration {
DEFINE_AST_NODE_LEAF_BOILERPLATE(ClassDeclaration)
ClassDeclaration(SourcePosition pos, Identifier* name, ClassFlags flags,
- base::Optional<TypeExpression*> super,
- base::Optional<std::string> generates,
+ TypeExpression* super, base::Optional<std::string> generates,
std::vector<Declaration*> methods,
std::vector<ClassFieldExpression> fields,
InstanceTypeConstraints instance_type_constraints)
@@ -1188,7 +1188,7 @@ struct ClassDeclaration : TypeDeclaration {
fields(std::move(fields)),
instance_type_constraints(std::move(instance_type_constraints)) {}
ClassFlags flags;
- base::Optional<TypeExpression*> super;
+ TypeExpression* super;
base::Optional<std::string> generates;
std::vector<Declaration*> methods;
std::vector<ClassFieldExpression> fields;