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

Unified Diff: pkg/compiler/lib/src/ssa/codegen.dart

Issue 707493003: dart2js: Trust type annotations more often with --trust-type-annotation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix argument spelling. Created 6 years, 1 month 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 | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/codegen.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index fce5372330fa5a595f9723b15dd429d612c0fe95..df440f1e28d7980de814347c221c1788865eaf22 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -2572,8 +2572,9 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
if (node.isArgumentTypeCheck || node.isReceiverTypeCheck) {
ClassWorld classWorld = compiler.world;
// An int check if the input is not int or null, is not
- // sufficient for doing a argument or receiver check.
- assert(!node.checkedType.containsOnlyInt(classWorld) ||
+ // sufficient for doing an argument or receiver check.
+ assert(compiler.trustTypeAnnotations ||
+ !node.checkedType.containsOnlyInt(classWorld) ||
node.checkedInput.isIntegerOrNull(compiler));
js.Expression test = generateTest(node.checkedInput, node.checkedType);
js.Block oldContainer = currentContainer;
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698