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

Unified Diff: runtime/vm/code_generator.cc

Issue 23480005: Change Bool::Get to return a handle instead of a pointer to a raw object. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 48a29a9b7005ae88ff2799cfd51d375d96ff110f..b80d822bdba647fc1906d2b8e95fbcb92f32a76a 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -565,9 +565,9 @@ DEFINE_RUNTIME_ENTRY(Instanceof, 5) {
ASSERT(type.IsFinalized());
Error& malformed_error = Error::Handle();
const Bool& result =
- instance.IsInstanceOf(type,
- instantiator_type_arguments,
- &malformed_error) ? Bool::True() : Bool::False();
+ Bool::Get(instance.IsInstanceOf(type,
+ instantiator_type_arguments,
+ &malformed_error));
if (FLAG_trace_type_checks) {
PrintTypeCheck("InstanceOf",
instance, type, instantiator_type_arguments, result);
@@ -621,7 +621,7 @@ DEFINE_RUNTIME_ENTRY(TypeCheck, 6) {
if (FLAG_trace_type_checks) {
PrintTypeCheck("TypeCheck",
src_instance, dst_type, instantiator_type_arguments,
- is_instance_of ? Bool::True() : Bool::False());
+ Bool::Get(is_instance_of));
}
if (!is_instance_of) {
// Throw a dynamic type error.
« no previous file with comments | « runtime/lib/simd128.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698