Chromium Code Reviews| Index: src/parser.cc |
| =================================================================== |
| --- src/parser.cc (revision 16036) |
| +++ src/parser.cc (working copy) |
| @@ -3204,6 +3204,13 @@ |
| factory()->NewNumberLiteral(-1), |
| position); |
| } |
| + // '~foo' => 'foo^(-1)' |
| + if (op == Token::BIT_NOT) { |
| + return factory()->NewBinaryOperation(Token::BIT_XOR, |
| + expression, |
| + factory()->NewNumberLiteral(-1), |
|
Sven Panne
2013/08/05 07:15:14
Replace the -1 by ~0 here and in the comment, it's
|
| + position); |
| + } |
| return factory()->NewUnaryOperation(op, expression, position); |