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

Side by Side Diff: pkg/analyzer/test/src/summary/prelinker_test.dart

Issue 2353433002: Use configurations and declared variables to select import/export URIs during prelinking. (Closed)
Patch Set: Cache selected URI. Created 4 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
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 library analyzer.test.src.summary.prelinker_test; 5 library analyzer.test.src.summary.prelinker_test;
6 6
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/src/generated/source.dart'; 8 import 'package:analyzer/src/generated/source.dart';
9 import 'package:analyzer/src/generated/source_io.dart'; 9 import 'package:analyzer/src/generated/source_io.dart';
10 import 'package:analyzer/src/summary/idl.dart'; 10 import 'package:analyzer/src/summary/idl.dart';
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 namespace = uriToPublicNamespace[absoluteUri]; 84 namespace = uriToPublicNamespace[absoluteUri];
85 } 85 }
86 if (namespace == null && !allowMissingFiles) { 86 if (namespace == null && !allowMissingFiles) {
87 fail('Prelinker unexpectedly requested namespace for "$relativeUri"' 87 fail('Prelinker unexpectedly requested namespace for "$relativeUri"'
88 ' (resolves to "$absoluteUri").' 88 ' (resolves to "$absoluteUri").'
89 ' Namespaces available: ${uriToPublicNamespace.keys}'); 89 ' Namespaces available: ${uriToPublicNamespace.keys}');
90 } 90 }
91 return namespace; 91 return namespace;
92 } 92 }
93 93
94 linked = new LinkedLibrary.fromBuffer( 94 linked = new LinkedLibrary.fromBuffer(prelink(
95 prelink(unlinkedUnits[0], getPart, getImport).toBuffer()); 95 unlinkedUnits[0], getPart, getImport, context.declaredVariables.get)
96 .toBuffer());
96 validateLinkedLibrary(linked); 97 validateLinkedLibrary(linked);
97 } 98 }
98 } 99 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/linker_test.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698