Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: src/parser.cc

Issue 6879081: Added type recording for unary minus and unary bitwise negation. Note that the (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Incorporated Florian's suggested changes Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/parser.cc
===================================================================
--- src/parser.cc (revision 7683)
+++ src/parser.cc (working copy)
@@ -2484,7 +2484,7 @@
x = NewCompareNode(cmp, x, y, position);
if (cmp != op) {
// The comparison was negated - add a NOT.
- x = new(zone()) UnaryOperation(Token::NOT, x);
+ x = new(zone()) UnaryOperation(Token::NOT, x, position);
}
} else {
@@ -2534,6 +2534,7 @@
Token::Value op = peek();
if (Token::IsUnaryOp(op)) {
op = Next();
+ int position = scanner().location().beg_pos;
Expression* expression = ParseUnaryExpression(CHECK_OK);
// Compute some expressions involving only number literals.
@@ -2561,7 +2562,7 @@
}
}
- return new(zone()) UnaryOperation(op, expression);
+ return new(zone()) UnaryOperation(op, expression, position);
} else if (Token::IsCountOp(op)) {
op = Next();

Powered by Google App Engine
This is Rietveld 408576698