Revert "dart2js: Do not emit type metadata for fields declared in non-reflectable classes."

This reverts commit 67537ffbd7.

BUG=
TBR=karlklose@google.com

Review URL: https://codereview.chromium.org//1148373004
This commit is contained in:
Stephan Herhut 2015-06-08 11:49:06 +02:00
parent 8e960c1318
commit 6cc3bd1124

View file

@ -161,12 +161,7 @@ class ClassEmitter extends CodeEmitterHelper {
fieldCode = FIELD_CODE_CHARACTERS[code - FIRST_FIELD_CODE];
}
}
// Fields can only be reflected if their declaring class is reflectable
// (as they are only accessible via [ClassMirror.declarations]. However,
// set/get operations can be performed on them, so they are reflectable
// in some sense.
if (backend.isAccessibleByReflection(fieldElement) &&
backend.isAccessibleByReflection(fieldElement.enclosingClass)) {
if (backend.isAccessibleByReflection(fieldElement)) {
DartType type = fieldElement.type;
reflectionMarker = '-${task.metadataCollector.reifyType(type)}';
}