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 <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
This commit is contained in:
Michaël Zasso authored and Italo A. Casas committed 2017-02-14 11:52:15 -05:00
1 parent 028bb632b2
commit 5446fa7e8c
1 file changed
+7 -1
+7 -1
View File
@@ -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());
}