[parsing] Update the comment on BuildUnaryExpression.
R=adamk@chromium.org Bug: Change-Id: Ic5668ba70065c7315c354b9921b3c493080da2a7 Reviewed-on: https://chromium-review.googlesource.com/803254 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#49812}
This commit is contained in:
parent
c53f4f6968
commit
25c57e7877
@ -760,17 +760,11 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
|
||||
bool CollapseNaryExpression(Expression** x, Expression* y, Token::Value op,
|
||||
int pos, const SourceRange& range);
|
||||
|
||||
// Rewrites the following types of unary expressions:
|
||||
// not <literal> -> true / false
|
||||
// + <numeric literal> -> <numeric literal>
|
||||
// - <numeric literal> -> <numeric literal with value negated>
|
||||
// Returns a UnaryExpression or, in one of the following cases, a Literal.
|
||||
// ! <literal> -> true / false
|
||||
// The following rewriting rules enable the collection of type feedback
|
||||
// without any special stub and the multiplication is removed later in
|
||||
// Crankshaft's canonicalization pass.
|
||||
// + foo -> foo * 1
|
||||
// - foo -> foo * (-1)
|
||||
// ~ foo -> foo ^(~0)
|
||||
// + <Number literal> -> <Number literal>
|
||||
// - <Number literal> -> <Number literal with value negated>
|
||||
// ~ <literal> -> true / false
|
||||
Expression* BuildUnaryExpression(Expression* expression, Token::Value op,
|
||||
int pos);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user