Permalink
Browse files

deps: work around SmartOS 14 incompatibility

Refs: nodejs/v8#1

PR-URL: #11029
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information...
targos authored and italoacasas committed Jan 26, 2017
1 parent 028bb63 commit 5446fa7e8c3dacd50a7fe230b09ca64d6cc57b9a
Showing with 7 additions and 1 deletion.
  1. +7 −1 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());
}

0 comments on commit 5446fa7

Please sign in to comment.