| 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 import '../common.dart'; | 5 import '../common.dart'; |
| 6 import '../compiler.dart' show Compiler; | 6 import '../compiler.dart' show Compiler; |
| 7 import '../constants/values.dart'; | 7 import '../constants/values.dart'; |
| 8 import '../elements/resolution_types.dart'; | 8 import '../elements/resolution_types.dart'; |
| 9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
| 10 import '../io/code_output.dart'; | 10 import '../io/code_output.dart'; |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 @override | 270 @override |
| 271 jsAst.Expression visitType(TypeConstantValue constant, [_]) { | 271 jsAst.Expression visitType(TypeConstantValue constant, [_]) { |
| 272 ResolutionDartType type = constant.representedType; | 272 ResolutionDartType type = constant.representedType; |
| 273 jsAst.Name typeName = namer.runtimeTypeName(type.element); | 273 jsAst.Name typeName = namer.runtimeTypeName(type.element); |
| 274 return new jsAst.Call(getHelperProperty(backend.helpers.createRuntimeType), | 274 return new jsAst.Call(getHelperProperty(backend.helpers.createRuntimeType), |
| 275 [js.quoteName(typeName)]); | 275 [js.quoteName(typeName)]); |
| 276 } | 276 } |
| 277 | 277 |
| 278 @override | 278 @override |
| 279 jsAst.Expression visitInterceptor(InterceptorConstantValue constant, [_]) { | 279 jsAst.Expression visitInterceptor(InterceptorConstantValue constant, [_]) { |
| 280 ClassElement interceptorClass = constant.dispatchedType.element; | 280 ClassElement interceptorClass = constant.cls; |
| 281 return backend.emitter.interceptorPrototypeAccess(interceptorClass); | 281 return backend.emitter.interceptorPrototypeAccess(interceptorClass); |
| 282 } | 282 } |
| 283 | 283 |
| 284 @override | 284 @override |
| 285 jsAst.Expression visitSynthetic(SyntheticConstantValue constant, [_]) { | 285 jsAst.Expression visitSynthetic(SyntheticConstantValue constant, [_]) { |
| 286 switch (constant.valueKind) { | 286 switch (constant.valueKind) { |
| 287 case SyntheticConstantKind.DUMMY_INTERCEPTOR: | 287 case SyntheticConstantKind.DUMMY_INTERCEPTOR: |
| 288 case SyntheticConstantKind.EMPTY_VALUE: | 288 case SyntheticConstantKind.EMPTY_VALUE: |
| 289 return new jsAst.LiteralNumber('0'); | 289 return new jsAst.LiteralNumber('0'); |
| 290 case SyntheticConstantKind.TYPEVARIABLE_REFERENCE: | 290 case SyntheticConstantKind.TYPEVARIABLE_REFERENCE: |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 arguments.add(rtiEncoder.getTypeRepresentation(argument, unexpected)); | 349 arguments.add(rtiEncoder.getTypeRepresentation(argument, unexpected)); |
| 350 } | 350 } |
| 351 return new jsAst.ArrayInitializer(arguments); | 351 return new jsAst.ArrayInitializer(arguments); |
| 352 } | 352 } |
| 353 | 353 |
| 354 @override | 354 @override |
| 355 jsAst.Expression visitDeferred(DeferredConstantValue constant, [_]) { | 355 jsAst.Expression visitDeferred(DeferredConstantValue constant, [_]) { |
| 356 return constantReferenceGenerator(constant.referenced); | 356 return constantReferenceGenerator(constant.referenced); |
| 357 } | 357 } |
| 358 } | 358 } |
| OLD | NEW |