diff options
Diffstat (limited to 'deps/v8/src/ast/ast-value-factory.h')
-rw-r--r-- | deps/v8/src/ast/ast-value-factory.h | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/deps/v8/src/ast/ast-value-factory.h b/deps/v8/src/ast/ast-value-factory.h index da209e122c..bc3eca264e 100644 --- a/deps/v8/src/ast/ast-value-factory.h +++ b/deps/v8/src/ast/ast-value-factory.h @@ -283,8 +283,8 @@ class AstValue : public ZoneObject { F(default, "default") \ F(done, "done") \ F(dot, ".") \ + F(dot_class_field_init, ".class-field-init") \ F(dot_for, ".for") \ - F(dot_generator, ".generator") \ F(dot_generator_object, ".generator_object") \ F(dot_iterator, ".iterator") \ F(dot_result, ".result") \ @@ -326,7 +326,6 @@ class AstValueFactory { values_(nullptr), strings_end_(&strings_), zone_(zone), - isolate_(NULL), hash_seed_(hash_seed) { ResetStrings(); #define F(name, str) name##_string_ = NULL; @@ -352,11 +351,10 @@ class AstValueFactory { const AstRawString* GetString(Handle<String> literal); const AstConsString* NewConsString(const AstString* left, const AstString* right); + const AstRawString* ConcatStrings(const AstRawString* left, + const AstRawString* right); void Internalize(Isolate* isolate); - bool IsInternalized() { - return isolate_ != NULL; - } #define F(name, str) \ const AstRawString* name##_string() { \ @@ -384,21 +382,13 @@ class AstValueFactory { private: AstValue* AddValue(AstValue* value) { - if (isolate_) { - value->Internalize(isolate_); - } else { - value->set_next(values_); - values_ = value; - } + value->set_next(values_); + values_ = value; return value; } AstString* AddString(AstString* string) { - if (isolate_) { - string->Internalize(isolate_); - } else { - *strings_end_ = string; - strings_end_ = string->next_location(); - } + *strings_end_ = string; + strings_end_ = string->next_location(); return string; } void ResetStrings() { @@ -413,7 +403,7 @@ class AstValueFactory { static bool AstRawStringCompare(void* a, void* b); // All strings are copied here, one after another (no NULLs inbetween). - base::HashMap string_table_; + base::CustomMatcherHashMap string_table_; // For keeping track of all AstValues and AstRawStrings we've created (so that // they can be internalized later). AstValue* values_; @@ -422,7 +412,6 @@ class AstValueFactory { AstString* strings_; AstString** strings_end_; Zone* zone_; - Isolate* isolate_; uint32_t hash_seed_; |