OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 abstract class ConstantVisitor<R> { | 7 abstract class ConstantVisitor<R> { |
8 R visitFunction(FunctionConstant constant); | 8 R visitFunction(FunctionConstant constant); |
9 R visitNull(NullConstant constant); | 9 R visitNull(NullConstant constant); |
10 R visitInt(IntConstant constant); | 10 R visitInt(IntConstant constant); |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 | 535 |
536 accept(ConstantVisitor visitor) => visitor.visitInterceptor(this); | 536 accept(ConstantVisitor visitor) => visitor.visitInterceptor(this); |
537 | 537 |
538 DartType computeType(Compiler compiler) => compiler.types.dynamicType; | 538 DartType computeType(Compiler compiler) => compiler.types.dynamicType; |
539 | 539 |
540 ti.TypeMask computeMask(Compiler compiler) { | 540 ti.TypeMask computeMask(Compiler compiler) { |
541 return compiler.typesTask.nonNullType; | 541 return compiler.typesTask.nonNullType; |
542 } | 542 } |
543 | 543 |
544 String toString() { | 544 String toString() { |
545 return 'InterceptorConstant(${Error.safeToString(dispatchedType)})'; | 545 return 'InterceptorConstant(${dispatchedType.getStringAsDeclared("o")})'; |
546 } | 546 } |
547 } | 547 } |
548 | 548 |
549 class DummyConstant extends Constant { | 549 class DummyConstant extends Constant { |
550 final ti.TypeMask typeMask; | 550 final ti.TypeMask typeMask; |
551 | 551 |
552 DummyConstant(this.typeMask); | 552 DummyConstant(this.typeMask); |
553 | 553 |
554 bool isDummy() => true; | 554 bool isDummy() => true; |
555 | 555 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 if (i > 0) sb.write(','); | 639 if (i > 0) sb.write(','); |
640 sb.write(Error.safeToString(field.name)); | 640 sb.write(Error.safeToString(field.name)); |
641 sb.write('='); | 641 sb.write('='); |
642 sb.write(Error.safeToString(value)); | 642 sb.write(Error.safeToString(value)); |
643 i++; | 643 i++; |
644 }); | 644 }); |
645 sb.write('))'); | 645 sb.write('))'); |
646 return sb.toString(); | 646 return sb.toString(); |
647 } | 647 } |
648 } | 648 } |
OLD | NEW |