| 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:async'; | 10 import 'dart:async'; |
| (...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2184 sourceEntry.modificationTime = | 2184 sourceEntry.modificationTime = |
| 2185 _contentCache.getModificationStamp(source); | 2185 _contentCache.getModificationStamp(source); |
| 2186 } | 2186 } |
| 2187 } else if (originalContents != null) { | 2187 } else if (originalContents != null) { |
| 2188 _incrementalAnalysisCache = | 2188 _incrementalAnalysisCache = |
| 2189 IncrementalAnalysisCache.clear(_incrementalAnalysisCache, source); | 2189 IncrementalAnalysisCache.clear(_incrementalAnalysisCache, source); |
| 2190 // We are removing the overlay for the file, check if the file's | 2190 // We are removing the overlay for the file, check if the file's |
| 2191 // contents is the same as it was in the overlay. | 2191 // contents is the same as it was in the overlay. |
| 2192 try { | 2192 try { |
| 2193 TimestampedData<String> fileContents = getContents(source); | 2193 TimestampedData<String> fileContents = getContents(source); |
| 2194 String fileContentsData = fileContents.data; | 2194 newContents = fileContents.data; |
| 2195 if (fileContentsData == originalContents) { | 2195 sourceEntry.modificationTime = fileContents.modificationTime; |
| 2196 sourceEntry.setValue(SourceEntry.CONTENT, fileContentsData); | 2196 if (newContents == originalContents) { |
| 2197 sourceEntry.modificationTime = fileContents.modificationTime; | 2197 sourceEntry.setValue(SourceEntry.CONTENT, newContents); |
| 2198 changed = false; | 2198 changed = false; |
| 2199 } | 2199 } |
| 2200 newContents = fileContentsData; | |
| 2201 } catch (e) {} | 2200 } catch (e) {} |
| 2202 // If not the same content (e.g. the file is being closed without save), | 2201 // If not the same content (e.g. the file is being closed without save), |
| 2203 // then force analysis. | 2202 // then force analysis. |
| 2204 if (changed) { | 2203 if (changed) { |
| 2205 if (!analysisOptions.incremental || | 2204 if (!analysisOptions.incremental || |
| 2206 !_tryPoorMansIncrementalResolution(source, newContents)) { | 2205 !_tryPoorMansIncrementalResolution(source, newContents)) { |
| 2207 _sourceChanged(source); | 2206 _sourceChanged(source); |
| 2208 } | 2207 } |
| 2209 } | 2208 } |
| 2210 } | 2209 } |
| (...skipping 9632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11843 PendingFuture pendingFuture = | 11842 PendingFuture pendingFuture = |
| 11844 new PendingFuture<T>(_context, source, computeValue); | 11843 new PendingFuture<T>(_context, source, computeValue); |
| 11845 if (!pendingFuture.evaluate(sourceEntry)) { | 11844 if (!pendingFuture.evaluate(sourceEntry)) { |
| 11846 _context._pendingFutureSources | 11845 _context._pendingFutureSources |
| 11847 .putIfAbsent(source, () => <PendingFuture>[]) | 11846 .putIfAbsent(source, () => <PendingFuture>[]) |
| 11848 .add(pendingFuture); | 11847 .add(pendingFuture); |
| 11849 } | 11848 } |
| 11850 return pendingFuture.future; | 11849 return pendingFuture.future; |
| 11851 } | 11850 } |
| 11852 } | 11851 } |
| OLD | NEW |