| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.js_emitter; | 5 part of dart2js.js_emitter; |
| 6 | 6 |
| 7 /// Represents an entry's position in one of the global metadata arrays. | 7 /// Represents an entry's position in one of the global metadata arrays. |
| 8 /// | 8 /// |
| 9 /// [_rc] is used to count the number of references of the token in the | 9 /// [_rc] is used to count the number of references of the token in the |
| 10 /// ast for a program. | 10 /// ast for a program. |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 _BoundMetadataEntry result = new _BoundMetadataEntry(node); | 236 _BoundMetadataEntry result = new _BoundMetadataEntry(node); |
| 237 if (_compiler.hasIncrementalSupport) { | 237 if (_compiler.hasIncrementalSupport) { |
| 238 result.finalize(_globalMetadataCounter++); | 238 result.finalize(_globalMetadataCounter++); |
| 239 } | 239 } |
| 240 return result; | 240 return result; |
| 241 }); | 241 }); |
| 242 } | 242 } |
| 243 | 243 |
| 244 jsAst.Expression _computeTypeRepresentation(DartType type, | 244 jsAst.Expression _computeTypeRepresentation(DartType type, |
| 245 {ignoreTypeVariables: false}) { | 245 {ignoreTypeVariables: false}) { |
| 246 jsAst.Expression representation = _backend.rti.getTypeRepresentation( | 246 jsAst.Expression representation = _backend.rtiEncoder.getTypeRepresentation( |
| 247 type, | 247 type, |
| 248 (variable) { | 248 (variable) { |
| 249 if (ignoreTypeVariables) return new jsAst.LiteralNull(); | 249 if (ignoreTypeVariables) return new jsAst.LiteralNull(); |
| 250 return _typeVariableHandler.reifyTypeVariable(variable.element); | 250 return _typeVariableHandler.reifyTypeVariable(variable.element); |
| 251 }, | 251 }, |
| 252 (TypedefType typedef) { | 252 (TypedefType typedef) { |
| 253 return _backend.isAccessibleByReflection(typedef.element); | 253 return _backend.isAccessibleByReflection(typedef.element); |
| 254 }); | 254 }); |
| 255 | 255 |
| 256 if (representation is jsAst.LiteralString) { | 256 if (representation is jsAst.LiteralString) { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 if (token is _ForwardingMetadataEntry && !token.isBound) { | 360 if (token is _ForwardingMetadataEntry && !token.isBound) { |
| 361 _foundUnboundToken = true; | 361 _foundUnboundToken = true; |
| 362 } | 362 } |
| 363 } | 363 } |
| 364 | 364 |
| 365 bool findUnboundPlaceholders(jsAst.Node node) { | 365 bool findUnboundPlaceholders(jsAst.Node node) { |
| 366 node.accept(this); | 366 node.accept(this); |
| 367 return _foundUnboundToken; | 367 return _foundUnboundToken; |
| 368 } | 368 } |
| 369 } | 369 } |
| OLD | NEW |