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

Unified Diff: vm/parser.cc

Issue 8963001: Add Double::NewCanonical and Mint::NewCanonical so that it is possible to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years 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
« no previous file with comments | « vm/object_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/parser.cc
===================================================================
--- vm/parser.cc (revision 2470)
+++ vm/parser.cc (working copy)
@@ -5507,8 +5507,7 @@
dbl_obj ^= rhs_literal->literal().raw();
double right_double = dbl_obj.value();
if (binary_op == Token::kDIV) {
- dbl_obj = Double::New(left_double / right_double, Heap::kOld);
- dbl_obj ^= dbl_obj.Canonicalize();
+ dbl_obj = Double::NewCanonical((left_double / right_double));
return new LiteralNode(op_pos, dbl_obj);
}
}
@@ -7382,11 +7381,10 @@
ASSERT(double_literal != NULL);
ASSERT(double_literal->Length() > 0);
Double& double_value =
- Double::ZoneHandle(Double::New(*double_literal, Heap::kOld));
+ Double::ZoneHandle(Double::NewCanonical(*double_literal));
if (double_value.IsNull()) {
ErrorMsg("invalid double literal");
}
- double_value ^= double_value.Canonicalize();
primary = new LiteralNode(token_index_, double_value);
ConsumeToken();
} else if (CurrentToken() == Token::kSTRING) {
« no previous file with comments | « vm/object_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698