| Index: dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
|
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
|
| index 53e32d8de8789e56ec417f7c048f3eb78ac0bd1e..86befd2da9ef2c986677c3d5a8fe9fcc469d8aa7 100644
|
| --- a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
|
| +++ b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
|
| @@ -8,13 +8,9 @@ part of dart2js.js_emitter;
|
| * A data structure for collecting fragments of a class definition.
|
| */
|
| class ClassBuilder {
|
| - final List<jsAst.Property> properties = <jsAst.Property>[];
|
| - final List<String> fields = <String>[];
|
| + // TODO (sigurdm) this is just a bag of properties, rename this class
|
|
|
| - String superName;
|
| - String nativeName;
|
| - String functionType;
|
| - List<jsAst.Node> fieldMetadata;
|
| + final List<jsAst.Property> properties = <jsAst.Property>[];
|
|
|
| /// Set to true by user if class is indistinguishable from its superclass.
|
| bool isTrivial = false;
|
| @@ -24,35 +20,8 @@ class ClassBuilder {
|
| properties.add(new jsAst.Property(js.string(name), value));
|
| }
|
|
|
| - void addField(String field) {
|
| - fields.add(field);
|
| - }
|
| -
|
| - jsAst.ObjectInitializer toObjectInitializer() {
|
| - StringBuffer buffer = new StringBuffer();
|
| - if (superName != null) {
|
| - if (nativeName != null) {
|
| - buffer.write('$nativeName/');
|
| - }
|
| - buffer.write('$superName');
|
| - if (functionType != null) {
|
| - buffer.write(':$functionType');
|
| - }
|
| - buffer.write(';');
|
| - }
|
| - buffer.writeAll(fields, ',');
|
| - var classData = js.string('$buffer');
|
| - if (fieldMetadata != null) {
|
| - // If we need to store fieldMetadata, classData is turned into an array,
|
| - // and the field metadata is appended. So if classData is just a string,
|
| - // there is no field metadata.
|
| - classData =
|
| - new jsAst.ArrayInitializer.from([classData]..addAll(fieldMetadata));
|
| - }
|
| - var fieldsAndProperties =
|
| - [new jsAst.Property(js.string(''), classData)]
|
| - ..addAll(properties);
|
| - return new jsAst.ObjectInitializer(fieldsAndProperties, isOneLiner: false);
|
| + jsAst.Expression toObjectInitializer() {
|
| + return new jsAst.ObjectInitializer(properties, isOneLiner: false);
|
| }
|
|
|
| }
|
|
|