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

Unified Diff: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart

Issue 1072043002: dart2js: retain constants that are used as annotations in constructors and setters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | tests/lib/mirrors/parameter_annotation_mirror_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
diff --git a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
index 3572ff417d7d49622697c6f5046a633eea5acfa9..dc2236886dbd2544b864c1d693e197cd124ab78f 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -196,7 +196,9 @@ class CodeEmitterTask extends CompilerTask {
for (Element element in backend.generatedCode.keys) {
if (backend.isAccessibleByReflection(element)) {
bool shouldRetainMetadata = backend.retainMetadataOf(element);
- if (shouldRetainMetadata && element.isFunction) {
+ if (shouldRetainMetadata &&
+ (element.isFunction || element.isConstructor ||
+ element.isSetter)) {
FunctionElement function = element;
function.functionSignature.forEachParameter(
backend.retainMetadataOf);
« no previous file with comments | « no previous file | tests/lib/mirrors/parameter_annotation_mirror_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698