| 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 '../js/js.dart' as js show Expression, Statement; | 7 import '../js/js.dart' as js show Expression, Statement; |
| 8 import '../constants/values.dart' show ConstantValue; | 8 import '../constants/values.dart' show ConstantValue; |
| 9 | 9 |
| 10 import '../deferred_load.dart' show OutputUnit; | 10 import '../deferred_load.dart' show OutputUnit; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 /// Note: the metadata is derived from the task's `metadataCollector`. The | 64 /// Note: the metadata is derived from the task's `metadataCollector`. The |
| 65 /// list must not be emitted before all operations on it are done. For | 65 /// list must not be emitted before all operations on it are done. For |
| 66 /// example, the old emitter generates metadata when emitting reflection | 66 /// example, the old emitter generates metadata when emitting reflection |
| 67 /// data. | 67 /// data. |
| 68 Map<OutputUnit, List<String>> get metadataTypes | 68 Map<OutputUnit, List<String>> get metadataTypes |
| 69 => _metadataCollector.types; | 69 => _metadataCollector.types; |
| 70 | 70 |
| 71 | 71 |
| 72 bool get isSplit => fragments.length > 1; | 72 bool get isSplit => fragments.length > 1; |
| 73 Iterable<Fragment> get deferredFragments => fragments.skip(1); | 73 Iterable<Fragment> get deferredFragments => fragments.skip(1); |
| 74 Fragment get mainFragment => fragments.first; |
| 74 } | 75 } |
| 75 | 76 |
| 76 /** | 77 /** |
| 77 * This class represents a JavaScript object that contains static state, like | 78 * This class represents a JavaScript object that contains static state, like |
| 78 * classes or functions. | 79 * classes or functions. |
| 79 */ | 80 */ |
| 80 class Holder { | 81 class Holder { |
| 81 final String name; | 82 final String name; |
| 82 final int index; | 83 final int index; |
| 83 Holder(this.name, this.index); | 84 Holder(this.name, this.index); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 requiredParameterCount: requiredParameterCount, | 481 requiredParameterCount: requiredParameterCount, |
| 481 optionalParameterDefaultValues: optionalParameterDefaultValues, | 482 optionalParameterDefaultValues: optionalParameterDefaultValues, |
| 482 functionType: functionType); | 483 functionType: functionType); |
| 483 } | 484 } |
| 484 | 485 |
| 485 class StaticStubMethod extends StubMethod implements StaticMethod { | 486 class StaticStubMethod extends StubMethod implements StaticMethod { |
| 486 Holder holder; | 487 Holder holder; |
| 487 StaticStubMethod(String name, this.holder, js.Expression code) | 488 StaticStubMethod(String name, this.holder, js.Expression code) |
| 488 : super(name, code); | 489 : super(name, code); |
| 489 } | 490 } |
| OLD | NEW |