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

Side by Side Diff: pkg/analyzer/lib/src/kernel/resynthesize.dart

Issue 3000913002: Add implicit dart:core import when resynthsize from Kernel. (Closed)
Patch Set: Created 3 years, 4 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 'package:analyzer/dart/ast/ast.dart'; 5 import 'package:analyzer/dart/ast/ast.dart';
6 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; 6 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
7 import 'package:analyzer/dart/ast/token.dart'; 7 import 'package:analyzer/dart/ast/token.dart';
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/dart/element/type.dart'; 9 import 'package:analyzer/dart/element/type.dart';
10 import 'package:analyzer/src/dart/element/element.dart'; 10 import 'package:analyzer/src/dart/element/element.dart';
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 485
486 @override 486 @override
487 final kernel.Library library; 487 final kernel.Library library;
488 488
489 Source librarySource; 489 Source librarySource;
490 LibraryElementImpl libraryElement; 490 LibraryElementImpl libraryElement;
491 491
492 _KernelLibraryResynthesizerContextImpl(this.resynthesizer, this.library); 492 _KernelLibraryResynthesizerContextImpl(this.resynthesizer, this.library);
493 493
494 @override 494 @override
495 kernel.Library get coreLibrary => resynthesizer._kernelMap['dart:core'];
496
497 @override
495 LibraryElementImpl getLibrary(String uriStr) { 498 LibraryElementImpl getLibrary(String uriStr) {
496 return resynthesizer.getLibrary(uriStr); 499 return resynthesizer.getLibrary(uriStr);
497 } 500 }
498 501
499 LibraryElementImpl _buildLibrary(String uriStr) { 502 LibraryElementImpl _buildLibrary(String uriStr) {
500 librarySource = resynthesizer._getSource(uriStr); 503 librarySource = resynthesizer._getSource(uriStr);
501 return libraryElement = 504 return libraryElement =
502 new LibraryElementImpl.forKernel(resynthesizer._analysisContext, this); 505 new LibraryElementImpl.forKernel(resynthesizer._analysisContext, this);
503 } 506 }
504 507
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 for (var typeParameter in ctx.typeParameters) { 818 for (var typeParameter in ctx.typeParameters) {
816 if (typeParameter.name == name) { 819 if (typeParameter.name == name) {
817 return typeParameter; 820 return typeParameter;
818 } 821 }
819 } 822 }
820 } 823 }
821 } 824 }
822 throw new StateError('Not found $kernelTypeParameter in $context'); 825 throw new StateError('Not found $kernelTypeParameter in $context');
823 } 826 }
824 } 827 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698