From fd04af18d34f4b4315ac30b19e28ce3d21efaff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 26 Jan 2017 23:52:53 +0100 Subject: [PATCH] deps: work around SmartOS 14 incompatibility Refs: https://github.com/nodejs/v8/issues/1 PR-URL: https://github.com/nodejs/node/pull/11029 Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen Reviewed-By: Myles Borins --- deps/v8/src/parsing/parser.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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()); }