Index: src/parser.cc |
=================================================================== |
--- src/parser.cc (revision 8307) |
+++ src/parser.cc (working copy) |
@@ -2556,6 +2556,11 @@ |
return NewNumberLiteral(-value); |
case Token::BIT_NOT: |
return NewNumberLiteral(~DoubleToInt32(value)); |
+ case Token::NOT: { |
+ bool bool_value = isnan(value) ? true : (value == 0); |
+ Handle<Object> boolean(isolate()->heap()->ToBoolean(bool_value)); |
+ return new(zone()) Literal(boolean); |
+ } |
default: break; |
} |
} |