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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 13019003: Enable full type-checks in checked mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix a bug. Created 7 years, 8 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: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index 42f055a7eda9f9a03265b893735585b4d292ce2d..9897ad0e6bf871afabe08909a21af8ab457f5234 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -2305,7 +2305,8 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
world.registerIsCheck(type, work.resolutionTree);
HInstruction input = node.expression;
- if (node.isVariableCheck || node.isCompoundCheck) {
+ if (node.isVariableCheck || node.isCompoundCheck ||
+ node.isCheckedModeTest) {
use(node.checkCall);
} else {
assert(node.isRawCheck);
@@ -2367,7 +2368,7 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
attachLocationToLast(node);
}
}
- if (node.nullOk) {
+ if (!node.isCheckedModeTest && node.nullOk) {
checkNull(input);
push(new js.Binary('||', pop(), pop()), node);
}

Powered by Google App Engine
This is Rietveld 408576698