Chromium Code Reviews| Index: pkg/compiler/lib/src/js_emitter/program_builder.dart |
| diff --git a/pkg/compiler/lib/src/js_emitter/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder.dart |
| index 1bdfc8105e337045e07aa4fdf06c0a7b13ee18c9..4e2f55577e1f5162fdeb4978ad9e506d378751da 100644 |
| --- a/pkg/compiler/lib/src/js_emitter/program_builder.dart |
| +++ b/pkg/compiler/lib/src/js_emitter/program_builder.dart |
| @@ -262,6 +262,28 @@ class ProgramBuilder { |
| staticFieldsForReflection); |
| } |
| + /// HACK for Try. |
|
ahe
2015/01/28 07:22:37
This is not for Try Dart. This is for incremental
floitsch
2015/01/28 16:25:05
Renamed function to buildClassWithFieldsForIncreme
|
| + /// |
| + /// Returns a class that contains the fields of a class. |
| + Class buildClassWithFieldsForTry(ClassElement element) { |
| + bool onlyForRti = _task.typeTestRegistry.rtiNeededClasses.contains(element); |
|
ahe
2015/01/28 07:22:37
For incremental compilation, this should probably
floitsch
2015/01/28 16:25:05
Done.
|
| + |
| + List<Field> instanceFields = |
| + onlyForRti ? const <Field>[] : _buildFields(element, false); |
| + |
| + String name = namer.getNameOfClass(element); |
| + String holderName = namer.globalObjectFor(element); |
| + Holder holder = _registry.registerHolder(holderName); |
|
ahe
2015/01/28 07:22:37
I'm not sure I understand what a holder is. Does t
floitsch
2015/01/28 16:25:05
In the new emitter it's more complicated.
Since yo
|
| + bool isInstantiated = |
| + _compiler.codegenWorld.directlyInstantiatedClasses.contains(element); |
|
ahe
2015/01/28 07:22:37
For incremental compilation, my guess is that it w
floitsch
2015/01/28 16:25:05
Done.
|
| + |
| + return new Class( |
| + element, name, holder, [], instanceFields, [], [], [], null, |
| + isDirectlyInstantiated: isInstantiated, |
| + onlyForRti: onlyForRti, |
|
ahe
2015/01/28 07:22:37
As mentioned above, the above two arguments should
floitsch
2015/01/28 16:25:05
Done.
|
| + isNative: element.isNative); |
| + } |
| + |
| Class _buildClass(ClassElement element) { |
| bool onlyForRti = _task.typeTestRegistry.rtiNeededClasses.contains(element); |