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

Unified Diff: pkg/analyzer/lib/src/summary/summarize_ast.dart

Issue 2748713002: Invoke native methods directly (Closed)
Patch Set: Address comments / cleanup Created 3 years, 9 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
Index: pkg/analyzer/lib/src/summary/summarize_ast.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index e60e9d9e5935d33bcb39a4aa014b7b10a6482ab2..0d5106f3350c81e2304505a35ce73500de974e37 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -1108,7 +1108,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
b.isConst = true;
b.constCycleSlot = assignSlot();
}
- b.isExternal = node.externalKeyword != null;
+ b.isExternal = node.externalKeyword != null || node.body is NativeFunctionBody;
b.documentationComment = serializeDocumentation(node.documentationComment);
b.annotations = serializeAnnotations(node.metadata);
b.codeRange = serializeCodeRange(node);
@@ -1230,7 +1230,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
node.documentationComment,
node.metadata,
node.functionExpression.typeParameters,
- node.externalKeyword != null,
+ node.externalKeyword != null || node.functionExpression.body is NativeFunctionBody,
false,
node.parent is FunctionDeclarationStatement));
}
@@ -1357,7 +1357,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
node.documentationComment,
node.metadata,
node.typeParameters,
- node.externalKeyword != null,
+ node.externalKeyword != null || node.body is NativeFunctionBody,
false,
false));
}

Powered by Google App Engine
This is Rietveld 408576698