diff options
author | Michaël Zasso <targos@protonmail.com> | 2022-04-19 09:00:36 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2022-04-21 11:54:15 +0200 |
commit | 6bbc5596b13828a5274a8aeaea4929bdc22168a4 (patch) | |
tree | 3fa11feb9240c699aff627e049d33c358a7320a4 /deps/v8/src/ast/ast.h | |
parent | 0d58c0be3e1c3013959c02d42a2a2f21dd31c5f8 (diff) | |
download | node-new-6bbc5596b13828a5274a8aeaea4929bdc22168a4.tar.gz |
deps: update V8 to 10.2.154.2
PR-URL: https://github.com/nodejs/node/pull/42740
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Diffstat (limited to 'deps/v8/src/ast/ast.h')
-rw-r--r-- | deps/v8/src/ast/ast.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/deps/v8/src/ast/ast.h b/deps/v8/src/ast/ast.h index 1fb5abdf8f..a348ccf82a 100644 --- a/deps/v8/src/ast/ast.h +++ b/deps/v8/src/ast/ast.h @@ -236,6 +236,8 @@ class Expression : public AstNode { // True iff the expression is the null literal. bool IsNullLiteral() const; + bool IsBooleanLiteral() const; + // True iff the expression is the hole literal. bool IsTheHoleLiteral() const; @@ -955,6 +957,11 @@ class Literal final : public Expression { return Smi::FromInt(smi_); } + bool AsBooleanLiteral() const { + DCHECK_EQ(kBoolean, type()); + return boolean_; + } + // Returns true if literal represents a Number. bool IsNumber() const { return type() == kHeapNumber || type() == kSmi; } double AsNumber() const { @@ -1598,14 +1605,14 @@ class OptionalChain final : public Expression { // Otherwise, the assignment is to a non-property (a global, a local slot, a // parameter slot, or a destructuring pattern). enum AssignType { - NON_PROPERTY, // destructuring - NAMED_PROPERTY, // obj.key - KEYED_PROPERTY, // obj[key] - NAMED_SUPER_PROPERTY, // super.key - KEYED_SUPER_PROPERTY, // super[key] - PRIVATE_METHOD, // obj.#key: #key is a private method - PRIVATE_GETTER_ONLY, // obj.#key: #key only has a getter defined - PRIVATE_SETTER_ONLY, // obj.#key: #key only has a setter defined + NON_PROPERTY, // destructuring + NAMED_PROPERTY, // obj.key + KEYED_PROPERTY, // obj[key] and obj.#key when #key is a private field + NAMED_SUPER_PROPERTY, // super.key + KEYED_SUPER_PROPERTY, // super[key] + PRIVATE_METHOD, // obj.#key: #key is a private method + PRIVATE_GETTER_ONLY, // obj.#key: #key only has a getter defined + PRIVATE_SETTER_ONLY, // obj.#key: #key only has a setter defined PRIVATE_GETTER_AND_SETTER // obj.#key: #key has both accessors defined }; @@ -1963,6 +1970,7 @@ class CompareOperation final : public Expression { // Match special cases. bool IsLiteralCompareTypeof(Expression** expr, Literal** literal); + bool IsLiteralStrictCompareBoolean(Expression** expr, Literal** literal); bool IsLiteralCompareUndefined(Expression** expr); bool IsLiteralCompareNull(Expression** expr); |