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

Unified Diff: vm/intermediate_language.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/handles.h ('k') | vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intermediate_language.cc
===================================================================
--- vm/intermediate_language.cc (revision 16591)
+++ vm/intermediate_language.cc (working copy)
@@ -1491,7 +1491,7 @@
// TODO(fschneider): Handle other cases: e === false and e !== true/false.
// Handles e === true.
if ((kind() == Token::kEQ_STRICT) &&
- (right_constant.raw() == Bool::True()) &&
+ (right_constant.raw() == Bool::True().raw()) &&
(left()->ResultCid() == kBoolCid)) {
// Return left subexpression as the replacement for this instruction.
return left_defn;
@@ -1791,8 +1791,7 @@
const bool result = (kind() == Token::kEQ_STRICT) ?
left.constant().raw() == right.constant().raw() :
left.constant().raw() != right.constant().raw();
- __ LoadObject(locs()->out().reg(), result ? compiler->bool_true() :
- compiler->bool_false());
+ __ LoadObject(locs()->out().reg(), result ? Bool::True() : Bool::False());
return;
}
if (left.IsConstant()) {
@@ -1813,10 +1812,10 @@
Label load_true, done;
Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQUAL : NOT_EQUAL;
__ j(true_condition, &load_true, Assembler::kNearJump);
- __ LoadObject(result, compiler->bool_false());
+ __ LoadObject(result, Bool::False());
__ jmp(&done, Assembler::kNearJump);
__ Bind(&load_true);
- __ LoadObject(result, compiler->bool_true());
+ __ LoadObject(result, Bool::True());
__ Bind(&done);
}
@@ -1963,10 +1962,10 @@
Register result = locs()->out().reg();
Label done;
- __ LoadObject(result, compiler->bool_true());
+ __ LoadObject(result, Bool::True());
__ CompareRegisters(result, value);
__ j(NOT_EQUAL, &done, Assembler::kNearJump);
- __ LoadObject(result, compiler->bool_false());
+ __ LoadObject(result, Bool::False());
__ Bind(&done);
}
« no previous file with comments | « vm/handles.h ('k') | vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698