| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine; | 8 library engine; |
| 9 | 9 |
| 10 import "dart:math" as math; | 10 import "dart:math" as math; |
| (...skipping 5073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5084 bool _tryPoorMansIncrementalResolution(Source unitSource, String newCode) { | 5084 bool _tryPoorMansIncrementalResolution(Source unitSource, String newCode) { |
| 5085 DartEntry dartEntry = _cache.get(unitSource); | 5085 DartEntry dartEntry = _cache.get(unitSource); |
| 5086 if (dartEntry == null) { | 5086 if (dartEntry == null) { |
| 5087 return false; | 5087 return false; |
| 5088 } | 5088 } |
| 5089 // prepare the (only) library | 5089 // prepare the (only) library |
| 5090 List<Source> librarySources = getLibrariesContaining(unitSource); | 5090 List<Source> librarySources = getLibrariesContaining(unitSource); |
| 5091 if (librarySources.length != 1) { | 5091 if (librarySources.length != 1) { |
| 5092 return false; | 5092 return false; |
| 5093 } | 5093 } |
| 5094 // do resolution | 5094 // prepare the existing unit |
| 5095 Source librarySource = librarySources[0]; | 5095 Source librarySource = librarySources[0]; |
| 5096 CompilationUnit oldUnit = | 5096 CompilationUnit oldUnit = |
| 5097 getResolvedCompilationUnit2(unitSource, librarySource); | 5097 getResolvedCompilationUnit2(unitSource, librarySource); |
| 5098 if (oldUnit == null) { |
| 5099 return false; |
| 5100 } |
| 5101 // do resolution |
| 5098 PoorMansIncrementalResolver resolver = new PoorMansIncrementalResolver( | 5102 PoorMansIncrementalResolver resolver = new PoorMansIncrementalResolver( |
| 5099 typeProvider, | 5103 typeProvider, |
| 5100 unitSource, | 5104 unitSource, |
| 5101 dartEntry, | 5105 dartEntry, |
| 5102 analysisOptions.incrementalApi); | 5106 analysisOptions.incrementalApi); |
| 5103 bool success = resolver.resolve(oldUnit, newCode); | 5107 bool success = resolver.resolve(oldUnit, newCode); |
| 5104 if (!success) { | 5108 if (!success) { |
| 5105 return false; | 5109 return false; |
| 5106 } | 5110 } |
| 5107 // prepare notice | 5111 // prepare notice |
| 5108 ChangeNoticeImpl notice = _getNotice(unitSource); | 5112 ChangeNoticeImpl notice = _getNotice(unitSource); |
| 5109 notice.compilationUnit = oldUnit; | 5113 notice.compilationUnit = oldUnit; |
| 5110 // TODO(scheglov) apply updated errors | 5114 // apply updated errors |
| 5111 { | 5115 { |
| 5112 LineInfo lineInfo = getLineInfo(unitSource); | 5116 LineInfo lineInfo = getLineInfo(unitSource); |
| 5113 notice.setErrors(dartEntry.allErrors, lineInfo); | 5117 notice.setErrors(dartEntry.allErrors, lineInfo); |
| 5114 } | 5118 } |
| 5115 return true; | 5119 return true; |
| 5116 } | 5120 } |
| 5117 | 5121 |
| 5118 /** | 5122 /** |
| 5119 * Check the cache for any invalid entries (entries whose modification time do
es not match the | 5123 * Check the cache for any invalid entries (entries whose modification time do
es not match the |
| 5120 * modification time of the source associated with the entry). Invalid entries
will be marked as | 5124 * modification time of the source associated with the entry). Invalid entries
will be marked as |
| (...skipping 9302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14423 | 14427 |
| 14424 @override | 14428 @override |
| 14425 Object visitPolymerTagDartElement(PolymerTagDartElement element) { | 14429 Object visitPolymerTagDartElement(PolymerTagDartElement element) { |
| 14426 if (element.name == PolymerHtmlUnitBuilder_this._elementName) { | 14430 if (element.name == PolymerHtmlUnitBuilder_this._elementName) { |
| 14427 throw new PolymerHtmlUnitBuilder_FoundTagDartElementError( | 14431 throw new PolymerHtmlUnitBuilder_FoundTagDartElementError( |
| 14428 element as PolymerTagDartElementImpl); | 14432 element as PolymerTagDartElementImpl); |
| 14429 } | 14433 } |
| 14430 return null; | 14434 return null; |
| 14431 } | 14435 } |
| 14432 } | 14436 } |
| OLD | NEW |