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

Side by Side Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2577943003: Use AnalysisOptions.signature as a way to check compatibility. (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement; 10 import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 /** 116 /**
117 * The [SourceFactory] is used to resolve URIs to paths and restore URIs 117 * The [SourceFactory] is used to resolve URIs to paths and restore URIs
118 * from file paths. 118 * from file paths.
119 */ 119 */
120 SourceFactory _sourceFactory; 120 SourceFactory _sourceFactory;
121 121
122 /** 122 /**
123 * The salt to mix into all hashes used as keys for serialized data. 123 * The salt to mix into all hashes used as keys for serialized data.
124 */ 124 */
125 final Uint32List _salt = 125 final Uint32List _salt = new Uint32List(1 + AnalysisOptions.signatureLength);
126 new Uint32List(1 + AnalysisOptions.crossContextOptionsLength);
127 126
128 /** 127 /**
129 * The current file system state. 128 * The current file system state.
130 */ 129 */
131 FileSystemState _fsState; 130 FileSystemState _fsState;
132 131
133 /** 132 /**
134 * The combined unlinked and linked package for the SDK, extracted from 133 * The combined unlinked and linked package for the SDK, extracted from
135 * the given [sourceFactory]. 134 * the given [sourceFactory].
136 */ 135 */
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 812
814 return new _LibraryContext(library, store); 813 return new _LibraryContext(library, store);
815 }); 814 });
816 } 815 }
817 816
818 /** 817 /**
819 * Fill [_salt] with data. 818 * Fill [_salt] with data.
820 */ 819 */
821 void _fillSalt() { 820 void _fillSalt() {
822 _salt[0] = DATA_VERSION; 821 _salt[0] = DATA_VERSION;
823 List<int> crossContextOptions = 822 List<int> crossContextOptions = _analysisOptions.signature;
824 _analysisOptions.encodeCrossContextOptions(); 823 assert(crossContextOptions.length == AnalysisOptions.signatureLength);
825 assert(crossContextOptions.length ==
826 AnalysisOptions.crossContextOptionsLength);
827 for (int i = 0; i < crossContextOptions.length; i++) { 824 for (int i = 0; i < crossContextOptions.length; i++) {
828 _salt[i + 1] = crossContextOptions[i]; 825 _salt[i + 1] = crossContextOptions[i];
829 } 826 }
830 } 827 }
831 828
832 /** 829 /**
833 * Load the [AnalysisResult] for the given [file] from the [bytes]. Set 830 * Load the [AnalysisResult] for the given [file] from the [bytes]. Set
834 * optional [content] and [resolvedUnit]. 831 * optional [content] and [resolvedUnit].
835 */ 832 */
836 AnalysisResult _getAnalysisResultFromBytes(FileState file, List<int> bytes, 833 AnalysisResult _getAnalysisResultFromBytes(FileState file, List<int> bytes,
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 libraryDeclarations.add(new TopLevelDeclarationInSource( 1592 libraryDeclarations.add(new TopLevelDeclarationInSource(
1596 file.source, declaration, isExported)); 1593 file.source, declaration, isExported));
1597 } 1594 }
1598 } 1595 }
1599 } 1596 }
1600 1597
1601 // We're not done yet. 1598 // We're not done yet.
1602 return false; 1599 return false;
1603 } 1600 }
1604 } 1601 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/status/get_handler.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698