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

Unified Diff: vm/code_generator.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/ast.cc ('k') | vm/code_generator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/code_generator.cc
===================================================================
--- vm/code_generator.cc (revision 16591)
+++ vm/code_generator.cc (working copy)
@@ -367,7 +367,7 @@
message,
String::Handle(instance_type.Name()).ToCString(),
Class::Handle(instance_type.type_class()).id(),
- (result.raw() == Bool::True()) ? "is" : "is !",
+ (result.raw() == Bool::True().raw()) ? "is" : "is !",
String::Handle(type.Name()).ToCString(),
Class::Handle(type.type_class()).id(),
caller_frame->pc());
@@ -378,7 +378,7 @@
OS::Print("%s: '%s' %s '%s' instantiated from '%s' (pc: %#"Px").\n",
message,
String::Handle(instance_type.Name()).ToCString(),
- (result.raw() == Bool::True()) ? "is" : "is !",
+ (result.raw() == Bool::True().raw()) ? "is" : "is !",
String::Handle(instantiated_type.Name()).ToCString(),
String::Handle(type.Name()).ToCString(),
caller_frame->pc());
@@ -564,11 +564,10 @@
SubtypeTestCache::CheckedHandle(arguments.ArgAt(4));
ASSERT(type.IsFinalized());
Error& malformed_error = Error::Handle();
- const Bool& result = Bool::Handle(
+ const Bool& result =
instance.IsInstanceOf(type,
instantiator_type_arguments,
- &malformed_error) ?
- Bool::True() : Bool::False());
+ &malformed_error) ? Bool::True() : Bool::False();
if (FLAG_trace_type_checks) {
PrintTypeCheck("InstanceOf",
instance, type, instantiator_type_arguments, result);
@@ -620,8 +619,8 @@
if (FLAG_trace_type_checks) {
PrintTypeCheck("TypeCheck",
- src_instance, dst_type, instantiator_type_arguments,
- Bool::Handle(is_instance_of ? Bool::True() : Bool::False()));
+ src_instance, dst_type, instantiator_type_arguments,
+ is_instance_of ? Bool::True() : Bool::False());
}
if (!is_instance_of) {
// Throw a dynamic type error.
@@ -648,7 +647,7 @@
}
UpdateTypeTestCache(src_instance, dst_type,
dst_instantiator, instantiator_type_arguments,
- Bool::ZoneHandle(Bool::True()), cache);
+ Bool::True(), cache);
arguments.SetReturn(src_instance);
}
@@ -679,7 +678,7 @@
}
}
}
- arguments.SetReturn(Bool::Handle(Bool::Get(is_defined)));
+ arguments.SetReturn(is_defined ? Bool::True() : Bool::False());
}
« no previous file with comments | « vm/ast.cc ('k') | vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698