ddfe681eb3
In order to avoid values from a deferred library to leak into the source code, we create an intermediate constant and refer via that. This is also done for non-primitive constants, so that for a case like:
main.dart:
import "lib.dart" deferred as lib;
class C { const C(); }
main() {
print(const C());
print(lib.C1);
}
lib.dart:
import "main.dart" as main;
const C1 = const main.C();
The main output file will not reveal that we are printing the same constant twice.
This CL also changes the constant emitter to be split between a literal emitter and a reference emitter, instead of a initializer emitter and a reference emitter.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//256453004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36286 260f80e4-7a28-3924-810f-c04153c831b5