| Index: pkg/compiler/lib/src/js_emitter/model.dart
|
| diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
|
| index 9692ef13bd5fe606c3f7ce096c030208b7ef834f..e95654a5268bddd759f5d4730e535e227fb3ff6c 100644
|
| --- a/pkg/compiler/lib/src/js_emitter/model.dart
|
| +++ b/pkg/compiler/lib/src/js_emitter/model.dart
|
| @@ -89,6 +89,10 @@ class Holder {
|
|
|
| Holder(this.name, this.index,
|
| {this.isStaticStateHolder: false, this.isConstantsHolder: false});
|
| +
|
| + String toString() {
|
| + return 'Holder(name=${name})';
|
| + }
|
| }
|
|
|
| /**
|
| @@ -144,6 +148,10 @@ class MainFragment extends Fragment {
|
| staticLazilyInitializedFields, constants);
|
|
|
| bool get isMainFragment => true;
|
| +
|
| + String toString() {
|
| + return 'MainFragment()';
|
| + }
|
| }
|
|
|
| /**
|
| @@ -164,6 +172,10 @@ class DeferredFragment extends Fragment {
|
| staticLazilyInitializedFields, constants);
|
|
|
| bool get isMainFragment => false;
|
| +
|
| + String toString() {
|
| + return 'DeferredFragment(name=${name})';
|
| + }
|
| }
|
|
|
| class Constant {
|
| @@ -172,6 +184,10 @@ class Constant {
|
| final ConstantValue value;
|
|
|
| Constant(this.name, this.holder, this.value);
|
| +
|
| + String toString() {
|
| + return 'Constant(name=${name},value=${value.toStructuredText()})';
|
| + }
|
| }
|
|
|
| abstract class FieldContainer {
|
| @@ -191,6 +207,10 @@ class Library implements FieldContainer {
|
|
|
| Library(this.element, this.uri, this.statics, this.classes,
|
| this.staticFieldsForReflection);
|
| +
|
| + String toString() {
|
| + return 'Library(uri=${uri},element=${element})';
|
| + }
|
| }
|
|
|
| class StaticField {
|
| @@ -208,6 +228,10 @@ class StaticField {
|
|
|
| StaticField(this.element, this.name, this.holder, this.code, this.isFinal,
|
| this.isLazy);
|
| +
|
| + String toString() {
|
| + return 'StaticField(name=${name},element=${element})';
|
| + }
|
| }
|
|
|
| class Class implements FieldContainer {
|
| @@ -292,7 +316,7 @@ class Class implements FieldContainer {
|
| int get superclassHolderIndex =>
|
| (superclass == null) ? 0 : superclass.holder.index;
|
|
|
| - String toString() => 'Class(${element.name})';
|
| + String toString() => 'Class(name=${name},element=$element)';
|
| }
|
|
|
| class MixinApplication extends Class {
|
| @@ -335,6 +359,8 @@ class MixinApplication extends Class {
|
| void setMixinClass(Class mixinClass) {
|
| _mixinClass = mixinClass;
|
| }
|
| +
|
| + String toString() => 'Mixin(name=${name},element=$element)';
|
| }
|
|
|
| /// A field.
|
| @@ -378,6 +404,10 @@ class Field {
|
|
|
| bool get needsInterceptedGetterOnThis => getterFlags == 3;
|
| bool get needsInterceptedSetterOnThis => setterFlags == 3;
|
| +
|
| + String toString() {
|
| + return 'Field(name=${name},element=${element})';
|
| + }
|
| }
|
|
|
| abstract class Method {
|
| @@ -392,11 +422,6 @@ abstract class Method {
|
| final js.Expression code;
|
|
|
| Method(this.element, this.name, this.code);
|
| -
|
| - String toString() {
|
| - return 'method[name=${name},element=${element}'
|
| - ',code=${js.nodeToString(code)}]';
|
| - }
|
| }
|
|
|
| /// A method that corresponds to a method in the original Dart program.
|
| @@ -481,6 +506,11 @@ class InstanceMethod extends DartMethod {
|
| }
|
|
|
| bool get isStatic => false;
|
| +
|
| + String toString() {
|
| + return 'InstanceMethod(name=${name},element=${element}'
|
| + ',code=${js.nodeToString(code)})';
|
| + }
|
| }
|
|
|
| /// A method that is generated by the backend and has not direct correspondence
|
| @@ -491,7 +521,8 @@ class StubMethod extends Method {
|
| : super(element, name, code);
|
|
|
| String toString() {
|
| - return 'stub[name=${name},element=${element},code=${js.nodeToString(code)}]';
|
| + return 'StubMethod(name=${name},element=${element}'
|
| + ',code=${js.nodeToString(code)})';
|
| }
|
| }
|
|
|
| @@ -514,6 +545,11 @@ class ParameterStubMethod extends StubMethod {
|
|
|
| ParameterStubMethod(js.Name name, this.callName, js.Expression code)
|
| : super(name, code);
|
| +
|
| + String toString() {
|
| + return 'ParameterStubMethod(name=${name},element=${element}'
|
| + ',code=${js.nodeToString(code)})';
|
| + }
|
| }
|
|
|
| abstract class StaticMethod implements Method {
|
| @@ -549,7 +585,8 @@ class StaticDartMethod extends DartMethod implements StaticMethod {
|
| bool get isStatic => true;
|
|
|
| String toString() {
|
| - return 'static_method[name=${name},element=${element}}]';
|
| + return 'StaticDartMethod(name=${name},element=${element}'
|
| + ',code=${js.nodeToString(code)})';
|
| }
|
| }
|
|
|
| @@ -557,4 +594,9 @@ class StaticStubMethod extends StubMethod implements StaticMethod {
|
| Holder holder;
|
| StaticStubMethod(js.Name name, this.holder, js.Expression code)
|
| : super(name, code);
|
| +
|
| + String toString() {
|
| + return 'StaticStubMethod(name=${name},element=${element}}'
|
| + ',code=${js.nodeToString(code)})';
|
| + }
|
| }
|
|
|