diff options
Diffstat (limited to 'deps/v8/src/ast/ast-value-factory.h')
-rw-r--r-- | deps/v8/src/ast/ast-value-factory.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/deps/v8/src/ast/ast-value-factory.h b/deps/v8/src/ast/ast-value-factory.h index 726d961362..472527bebe 100644 --- a/deps/v8/src/ast/ast-value-factory.h +++ b/deps/v8/src/ast/ast-value-factory.h @@ -35,7 +35,6 @@ #include "src/globals.h" #include "src/heap/factory.h" #include "src/isolate.h" -#include "src/utils.h" // Ast(Raw|Cons)String and AstValueFactory are for storing strings and // values independent of the V8 heap and internalizing them later. During @@ -107,11 +106,11 @@ class AstRawString final : public ZoneObject { #endif } - // {string_} is stored as String** instead of a Handle<String> so it can be + // {string_} is stored as Address* instead of a Handle<String> so it can be // stored in a union with {next_}. union { AstRawString* next_; - String** string_; + Address* string_; }; Vector<const byte> literal_bytes_; // Memory owned by Zone. @@ -163,12 +162,12 @@ class AstConsString final : public ZoneObject { AstConsString* next() const { return next_; } AstConsString** next_location() { return &next_; } - // {string_} is stored as String** instead of a Handle<String> so it can be + // {string_} is stored as Address* instead of a Handle<String> so it can be // stored in a union with {next_}. void set_string(Handle<String> string) { string_ = string.location(); } union { AstConsString* next_; - String** string_; + Address* string_; }; struct Segment { @@ -195,8 +194,10 @@ class AstBigInt { // For generating constants. #define AST_STRING_CONSTANTS(F) \ + F(anonymous, "anonymous") \ F(anonymous_function, "(anonymous function)") \ F(arguments, "arguments") \ + F(as, "as") \ F(async, "async") \ F(await, "await") \ F(bigint, "bigint") \ @@ -214,29 +215,34 @@ class AstBigInt { F(dot_catch, ".catch") \ F(empty, "") \ F(eval, "eval") \ + F(from, "from") \ F(function, "function") \ + F(get, "get") \ F(get_space, "get ") \ F(length, "length") \ F(let, "let") \ + F(meta, "meta") \ F(name, "name") \ F(native, "native") \ F(new_target, ".new.target") \ F(next, "next") \ F(number, "number") \ F(object, "object") \ + F(of, "of") \ + F(private_constructor, "#constructor") \ F(proto, "__proto__") \ F(prototype, "prototype") \ F(return, "return") \ + F(set, "set") \ F(set_space, "set ") \ F(star_default_star, "*default*") \ F(string, "string") \ F(symbol, "symbol") \ + F(target, "target") \ F(this, "this") \ F(this_function, ".this_function") \ F(throw, "throw") \ F(undefined, "undefined") \ - F(use_asm, "use asm") \ - F(use_strict, "use strict") \ F(value, "value") class AstStringConstants final { @@ -356,7 +362,8 @@ class AstValueFactory { const AstConsString* empty_cons_string_; // Caches one character lowercase strings (for minified code). - AstRawString* one_character_strings_[26]; + static const int kMaxOneCharStringValue = 128; + AstRawString* one_character_strings_[kMaxOneCharStringValue]; Zone* zone_; |