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

Unified Diff: packages/initialize/lib/transformer.dart

Issue 3015713002: Roll to pickup pool changes
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packages/initialize/lib/src/mirror_loader.dart ('k') | packages/initialize/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/initialize/lib/transformer.dart
diff --git a/packages/initialize/lib/transformer.dart b/packages/initialize/lib/transformer.dart
index 34acd4ace11f7dd9b564c7ea7b7e835ab054df31..06ae76e3e8d2758e7f96a2af0a82e4d48535b82f 100644
--- a/packages/initialize/lib/transformer.dart
+++ b/packages/initialize/lib/transformer.dart
@@ -129,8 +129,7 @@ class InitializeTransformer extends Transformer {
// [entryPoint].
void _replaceEntryWithBootstrap(Transform transform, dom.Document document,
AssetId entryPoint, AssetId originalDartFile, AssetId newDartFile) {
- var scripts = _getScripts(document)
- .where((script) {
+ var scripts = _getScripts(document).where((script) {
var assetId = uriToAssetId(entryPoint, _getScriptAttribute(script),
transform.logger, script.sourceSpan);
return assetId == originalDartFile;
@@ -258,6 +257,7 @@ class _BootstrapFileBuilder {
'(possibly transitive).');
}
}
+
readSuperClassAnnotations(clazz.supertype);
_readAnnotations(clazz);
}
@@ -271,9 +271,9 @@ class _BootstrapFileBuilder {
var metaNodes;
var node = element.computeNode();
if (node is SimpleIdentifier && node.parent is LibraryIdentifier) {
- metaNodes = node.parent.parent.metadata;
+ metaNodes = (node.parent.parent as AnnotatedNode).metadata;
} else if (node is ClassDeclaration || node is FunctionDeclaration) {
- metaNodes = node.metadata;
+ metaNodes = (node as AnnotatedNode).metadata;
} else {
return found;
}
@@ -283,7 +283,10 @@ class _BootstrapFileBuilder {
var meta = metaNode.elementAnnotation;
var e = meta.element;
if (e is PropertyAccessorElement) {
- return _isInitializer(e.variable.evaluationResult.value.type);
+ // 'as dynamic' is because evaluationResult is a property on an impl class, e.g. one that
+ // isn't supposed to be used externally.
+ return _isInitializer(
+ (e.variable as dynamic).evaluationResult.value.type);
} else if (e is ConstructorElement) {
return _isInitializer(e.returnType);
}
« no previous file with comments | « packages/initialize/lib/src/mirror_loader.dart ('k') | packages/initialize/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698