Skip to content

Commit

Permalink
deps: work around SmartOS 14 incompatibility
Browse files Browse the repository at this point in the history
Refs: nodejs/v8#1

PR-URL: #11029
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
  • Loading branch information
targos authored and italoacasas committed Feb 14, 2017
1 parent 028bb63 commit 5446fa7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion deps/v8/src/parsing/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit 5446fa7

Please sign in to comment.