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

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: Rebase and improvements. 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
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 ||
sra1 2014/11/06 17:47:51 Does inserting the HTypeKnown during inlining not
floitsch 2014/11/07 15:50:13 The problem seems to be that HTypeKnown nodes are
+ !node.checkedType.containsOnlyInt(classWorld) ||
node.checkedInput.isIntegerOrNull(compiler));
js.Expression test = generateTest(node.checkedInput, node.checkedType);
js.Block oldContainer = currentContainer;

Powered by Google App Engine
This is Rietveld 408576698