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

Unified Diff: lib/compiler/implementation/elements/elements.dart

Issue 10697096: Add "external" prefix to methods and constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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: lib/compiler/implementation/elements/elements.dart
diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
index ad690789f5fbb8c414a1ab6995d0c5cfe0b77fdc..d05b3b67ec80855fc68e4edc861ae8af6c78b8b9 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -708,9 +708,14 @@ class FunctionElement extends Element {
Node parseNode(DiagnosticListener listener) {
if (cachedNode !== null) return cachedNode;
- if (patch !== null) {
- cachedNode = patch.parseNode(listener);
+ if (patch === null) {
+ if (modifiers.isExternal()) {
+ // An external function that isn't patched has no body.
+ return null;
+ }
+ return cachedNode;
}
+ cachedNode = patch.parseNode(listener);
return cachedNode;
}
« no previous file with comments | « no previous file | lib/compiler/implementation/scanner/keyword.dart » ('j') | lib/compiler/implementation/scanner/listener.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698