diff --git a/src/ast/ast.h b/src/ast/ast.h index 3073a87228..283d896eac 100644 --- a/src/ast/ast.h +++ b/src/ast/ast.h @@ -3058,9 +3058,6 @@ class AstNodeFactory final BASE_EMBEDDED { : zone_(zone), ast_value_factory_(ast_value_factory) {} AstValueFactory* ast_value_factory() const { return ast_value_factory_; } - void set_ast_value_factory(AstValueFactory* ast_value_factory) { - ast_value_factory_ = ast_value_factory; - } VariableDeclaration* NewVariableDeclaration(VariableProxy* proxy, Scope* scope, int pos) { diff --git a/src/compiler.cc b/src/compiler.cc index 0e2ad3996e..586bdcd016 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -501,11 +501,9 @@ bool CompileUnoptimizedInnerFunctions( parse_info.set_literal(literal); parse_info.set_function_literal_id(shared->function_literal_id()); parse_info.set_language_mode(literal->scope()->language_mode()); - parse_info.set_ast_value_factory( - outer_info->parse_info()->ast_value_factory()); - parse_info.set_ast_value_factory_owned(false); parse_info.set_source_range_map( outer_info->parse_info()->source_range_map()); + parse_info.ShareAstValueFactory(outer_info->parse_info()); if (will_serialize) info.PrepareForSerializing(); if (is_debug) info.MarkAsDebug(); diff --git a/src/parsing/parse-info.cc b/src/parsing/parse-info.cc index b8a5e15fd3..3de4295648 100644 --- a/src/parsing/parse-info.cc +++ b/src/parsing/parse-info.cc @@ -93,14 +93,6 @@ ParseInfo::ParseInfo(Handle