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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/closure.dart

Issue 23875033: Do not analyze assert when assertions are disabled. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library closureToClassMapper; 5 library closureToClassMapper;
6 6
7 import "elements/elements.dart"; 7 import "elements/elements.dart";
8 import "dart2jslib.dart"; 8 import "dart2jslib.dart";
9 import "dart_types.dart"; 9 import "dart_types.dart";
10 import "scanner/scannerlib.dart" show Token; 10 import "scanner/scannerlib.dart" show Token;
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } else if (node.isTypeTest || node.isTypeCast) { 529 } else if (node.isTypeTest || node.isTypeCast) {
530 TypeAnnotation annotation = node.typeAnnotationFromIsCheckOrCast; 530 TypeAnnotation annotation = node.typeAnnotationFromIsCheckOrCast;
531 DartType type = elements.getType(annotation); 531 DartType type = elements.getType(annotation);
532 analyzeType(type); 532 analyzeType(type);
533 } else if (node.isTypeTest) { 533 } else if (node.isTypeTest) {
534 DartType type = elements.getType(node.typeAnnotationFromIsCheckOrCast); 534 DartType type = elements.getType(node.typeAnnotationFromIsCheckOrCast);
535 analyzeType(type); 535 analyzeType(type);
536 } else if (node.isTypeCast) { 536 } else if (node.isTypeCast) {
537 DartType type = elements.getType(node.arguments.head); 537 DartType type = elements.getType(node.arguments.head);
538 analyzeType(type); 538 analyzeType(type);
539 } else if (element == compiler.assertMethod
540 && !compiler.enableUserAssertions) {
541 return;
539 } 542 }
540 node.visitChildren(this); 543 node.visitChildren(this);
541 } 544 }
542 545
543 visitSendSet(SendSet node) { 546 visitSendSet(SendSet node) {
544 Element element = elements[node]; 547 Element element = elements[node];
545 if (Elements.isLocal(element)) { 548 if (Elements.isLocal(element)) {
546 mutatedVariables.add(element); 549 mutatedVariables.add(element);
547 } 550 }
548 if (Elements.isLocal(element) && 551 if (Elements.isLocal(element) &&
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 } 828 }
826 829
827 visitTryStatement(TryStatement node) { 830 visitTryStatement(TryStatement node) {
828 // TODO(ngeoffray): implement finer grain state. 831 // TODO(ngeoffray): implement finer grain state.
829 bool oldInTryStatement = inTryStatement; 832 bool oldInTryStatement = inTryStatement;
830 inTryStatement = true; 833 inTryStatement = true;
831 node.visitChildren(this); 834 node.visitChildren(this);
832 inTryStatement = oldInTryStatement; 835 inTryStatement = oldInTryStatement;
833 } 836 }
834 } 837 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698