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

Unified Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 10905235: Check boolean conversion in checked mode. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « lib/compiler/implementation/ssa/codegen.dart ('k') | lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/nodes.dart
===================================================================
--- lib/compiler/implementation/ssa/nodes.dart (revision 12308)
+++ lib/compiler/implementation/ssa/nodes.dart (working copy)
@@ -2527,6 +2527,7 @@
static const int CHECKED_MODE_CHECK = 1;
static const int ARGUMENT_TYPE_CHECK = 2;
static const int CAST_TYPE_CHECK = 3;
+ static const int BOOLEAN_CONVERSION_CHECK = 4;
HTypeConversion(this.type, HInstruction input, [this.kind = NO_CHECK])
: super(<HInstruction>[input]) {
@@ -2541,9 +2542,12 @@
bool get isChecked => kind != NO_CHECK;
- bool get isCheckedModeCheck => kind == CHECKED_MODE_CHECK;
+ bool get isCheckedModeCheck {
+ return kind == CHECKED_MODE_CHECK || kind == BOOLEAN_CONVERSION_CHECK;
+ }
bool get isArgumentTypeCheck => kind == ARGUMENT_TYPE_CHECK;
bool get isCastTypeCheck => kind == CAST_TYPE_CHECK;
+ bool get isBooleanConversionCheck => kind == BOOLEAN_CONVERSION_CHECK;
HType get guaranteedType => type;
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698