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

Side by Side Diff: lib/src/checker/checker.dart

Issue 1245013005: fixes #259, clone ast before mutation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: revert dependency_overrides in pubspec Created 5 years, 5 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
« no previous file with comments | « no previous file | lib/src/codegen/js_codegen.dart » ('j') | test/codegen/expect/sunflower/dom.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dev_compiler.src.checker.checker; 5 library dev_compiler.src.checker.checker;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/src/generated/ast.dart'; 8 import 'package:analyzer/src/generated/ast.dart';
9 import 'package:analyzer/src/generated/element.dart'; 9 import 'package:analyzer/src/generated/element.dart';
10 import 'package:analyzer/src/generated/scanner.dart' show Token, TokenType; 10 import 'package:analyzer/src/generated/scanner.dart' show Token, TokenType;
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 DynamicInvoke.set(target, true); 994 DynamicInvoke.set(target, true);
995 } 995 }
996 996
997 void _recordMessage(StaticInfo info) { 997 void _recordMessage(StaticInfo info) {
998 if (info == null) return; 998 if (info == null) return;
999 var error = info.toAnalysisError(); 999 var error = info.toAnalysisError();
1000 if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true; 1000 if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) _failure = true;
1001 reporter.onError(error); 1001 reporter.onError(error);
1002 1002
1003 if (info is CoercionInfo) { 1003 if (info is CoercionInfo) {
1004 assert(CoercionInfo.get(info.node) == null); 1004 // TODO(jmesserly): if we're run again on the same AST, we'll produce the
1005 // same annotations. This should be harmless. This might go away once
1006 // CodeChecker is integrated better with analyzer, as it will know that
1007 // checking has already been performed.
1008 // assert(CoercionInfo.get(info.node) == null);
1005 CoercionInfo.set(info.node, info); 1009 CoercionInfo.set(info.node, info);
1006 } 1010 }
1007 } 1011 }
1008 } 1012 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/codegen/js_codegen.dart » ('j') | test/codegen/expect/sunflower/dom.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698