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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 23479025: Implement reflection on function type aliases (typedef). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: ParameterMirror.isStatic Created 7 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 | « no previous file | dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 6a3d10231486ce106b1b46ee5e407fdfad4b2ab8..c80805a5fb394bc701844b9c2e6c5c6ea6f53ed7 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -341,6 +341,9 @@ class JavaScriptBackend extends Backend {
/// List of elements that the backend may use.
final Set<Element> helpersUsed = new Set<Element>();
+ /// Set of typedefs that are used as type literals.
+ final Set<TypedefElement> typedefTypeLiterals = new Set<TypedefElement>();
+
JavaScriptBackend(Compiler compiler, bool generateSourceMap, bool disableEval)
: namer = determineNamer(compiler),
oneShotInterceptors = new Map<String, Selector>(),
@@ -810,6 +813,9 @@ class JavaScriptBackend extends Backend {
// TODO(ahe): Might want to register [element] as an instantiated class
// when reflection is used. However, as long as we disable tree-shaking
// eagerly it doesn't matter.
+ if (element.isTypedef()) {
+ typedefTypeLiterals.add(element);
+ }
}
void registerStackTraceInCatch(TreeElements elements) {
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698