diff --git a/deps/v8/src/parsing/parser.cc b/deps/v8/src/parsing/parser.cc index 7b88695e778bae..2933f7d5470b4c 100644 --- a/deps/v8/src/parsing/parser.cc +++ b/deps/v8/src/parsing/parser.cc @@ -3349,11 +3349,17 @@ Expression* Parser::InstallHomeObject(Expression* function_literal, return do_expr; } +inline const std::string IntToString(int n) { + std::ostringstream oss; + oss << n; + return oss.str(); +} + const AstRawString* ClassFieldVariableName(bool is_name, AstValueFactory* ast_value_factory, int index) { std::string name = - ".class-field-" + std::to_string(index) + (is_name ? "-name" : "-func"); + ".class-field-" + IntToString(index) + (is_name ? "-name" : "-func"); return ast_value_factory->GetOneByteString(name.c_str()); }