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

Unified Diff: vm/parser.cc

Issue 11745022: - Make Boolean 'true' and 'false' singleton VM isolate objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 12 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
« no previous file with comments | « vm/object_test.cc ('k') | vm/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/parser.cc
===================================================================
--- vm/parser.cc (revision 16591)
+++ vm/parser.cc (working copy)
@@ -4987,11 +4987,11 @@
return true;
} else if ((CurrentToken() == Token::kTRUE) &&
(no_check || type.IsBoolType())) {
- *value = Bool::True();
+ *value = Bool::True().raw();
return true;
} else if ((CurrentToken() == Token::kFALSE) &&
(no_check || type.IsBoolType())) {
- *value = Bool::False();
+ *value = Bool::False().raw();
return true;
} else if (CurrentToken() == Token::kNULL) {
*value = Instance::null();
@@ -9224,7 +9224,7 @@
if (param_index < owner_function.num_fixed_parameters()) {
// The formal parameter is not optional, therefore the corresponding
// argument is always passed and defined.
- return new LiteralNode(test_pos, Bool::ZoneHandle(Bool::True()));
+ return new LiteralNode(test_pos, Bool::True());
}
char name[64];
OS::SNPrint(name, 64, "%s_%"Pd"",
@@ -9318,10 +9318,10 @@
primary = new LiteralNode(TokenPos(), literal);
ConsumeToken();
} else if (CurrentToken() == Token::kTRUE) {
- primary = new LiteralNode(TokenPos(), Bool::ZoneHandle(Bool::True()));
+ primary = new LiteralNode(TokenPos(), Bool::True());
ConsumeToken();
} else if (CurrentToken() == Token::kFALSE) {
- primary = new LiteralNode(TokenPos(), Bool::ZoneHandle(Bool::False()));
+ primary = new LiteralNode(TokenPos(), Bool::False());
ConsumeToken();
} else if (CurrentToken() == Token::kNULL) {
primary = new LiteralNode(TokenPos(), Instance::ZoneHandle());
« no previous file with comments | « vm/object_test.cc ('k') | vm/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698