| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library dart2js.new_js_emitter.model; | 5 library dart2js.new_js_emitter.model; |
| 6 | 6 |
| 7 import '../constants/values.dart' show ConstantValue; | 7 import '../constants/values.dart' show ConstantValue; |
| 8 import '../deferred_load.dart' show OutputUnit; | 8 import '../deferred_load.dart' show OutputUnit; |
| 9 import '../elements/elements.dart' show Element; | 9 import '../elements/elements.dart' show Element, FieldElement; |
| 10 import '../js/js.dart' as js show Expression, Name, Statement, TokenFinalizer; | 10 import '../js/js.dart' as js show Expression, Name, Statement, TokenFinalizer; |
| 11 import 'js_emitter.dart' show MetadataCollector; | 11 import 'js_emitter.dart' show MetadataCollector; |
| 12 | 12 |
| 13 class Program { | 13 class Program { |
| 14 final List<Fragment> fragments; | 14 final List<Fragment> fragments; |
| 15 final List<Holder> holders; | 15 final List<Holder> holders; |
| 16 final bool outputContainsConstantList; | 16 final bool outputContainsConstantList; |
| 17 final bool needsNativeSupport; | 17 final bool needsNativeSupport; |
| 18 final bool hasIsolateSupport; | 18 final bool hasIsolateSupport; |
| 19 | 19 |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 } | 329 } |
| 330 | 330 |
| 331 /// A field. | 331 /// A field. |
| 332 /// | 332 /// |
| 333 /// In general represents an instance field, but for reflection may also | 333 /// In general represents an instance field, but for reflection may also |
| 334 /// represent static fields. | 334 /// represent static fields. |
| 335 class Field { | 335 class Field { |
| 336 /// The element should only be used during the transition to the new model. | 336 /// The element should only be used during the transition to the new model. |
| 337 /// Uses indicate missing information in the model. | 337 /// Uses indicate missing information in the model. |
| 338 final Element element; | 338 final FieldElement element; |
| 339 | 339 |
| 340 final js.Name name; | 340 final js.Name name; |
| 341 final js.Name accessorName; | 341 final js.Name accessorName; |
| 342 | 342 |
| 343 /// 00: Does not need any getter. | 343 /// 00: Does not need any getter. |
| 344 /// 01: function() { return this.field; } | 344 /// 01: function() { return this.field; } |
| 345 /// 10: function(receiver) { return receiver.field; } | 345 /// 10: function(receiver) { return receiver.field; } |
| 346 /// 11: function(receiver) { return this.field; } | 346 /// 11: function(receiver) { return this.field; } |
| 347 final int getterFlags; | 347 final int getterFlags; |
| 348 | 348 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 functionType: functionType); | 529 functionType: functionType); |
| 530 | 530 |
| 531 bool get isStatic => true; | 531 bool get isStatic => true; |
| 532 } | 532 } |
| 533 | 533 |
| 534 class StaticStubMethod extends StubMethod implements StaticMethod { | 534 class StaticStubMethod extends StubMethod implements StaticMethod { |
| 535 Holder holder; | 535 Holder holder; |
| 536 StaticStubMethod(js.Name name, this.holder, js.Expression code) | 536 StaticStubMethod(js.Name name, this.holder, js.Expression code) |
| 537 : super(name, code); | 537 : super(name, code); |
| 538 } | 538 } |
| OLD | NEW |