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

Unified Diff: src/ast.h

Issue 12459011: Avoid bool to Oddball conversions by being lazy. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 | « src/api.cc ('k') | src/execution.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 66b4dd46c46fa23d577edb1ef2197ceafcf7d225..05f0653dc98ee4515390634551f5449e6ea0b46f 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1183,8 +1183,8 @@ class Literal: public Expression {
return Handle<String>::cast(handle_);
}
- virtual bool ToBooleanIsTrue() { return handle_->ToBoolean()->IsTrue(); }
- virtual bool ToBooleanIsFalse() { return handle_->ToBoolean()->IsFalse(); }
+ virtual bool ToBooleanIsTrue() { return handle_->BooleanValue(); }
+ virtual bool ToBooleanIsFalse() { return !handle_->BooleanValue(); }
// Identity testers.
bool IsNull() const {
« no previous file with comments | « src/api.cc ('k') | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698