Chromium Code Reviews| 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 28 matching lines...) Expand all Loading... | |
| 39 this.outputContainsConstantList, | 39 this.outputContainsConstantList, |
| 40 this.hasIsolateSupport}) { | 40 this.hasIsolateSupport}) { |
| 41 assert(needsNativeSupport != null); | 41 assert(needsNativeSupport != null); |
| 42 assert(outputContainsConstantList != null); | 42 assert(outputContainsConstantList != null); |
| 43 assert(hasIsolateSupport != null); | 43 assert(hasIsolateSupport != null); |
| 44 } | 44 } |
| 45 | 45 |
| 46 /// A list of pretty-printed JavaScript expressions. | 46 /// A list of pretty-printed JavaScript expressions. |
| 47 /// | 47 /// |
| 48 /// This list must be emitted in the `METADATA` embedded global. | 48 /// This list must be emitted in the `METADATA` embedded global. |
| 49 /// The list references constants and must hence be emitted after constants | 49 /// The list references constants and must hence be emitted after constants |
|
floitsch
2015/03/06 12:48:50
Do you know if this is still the case?
zarah
2015/03/06 13:05:52
I believe it is since for instance the type variab
| |
| 50 /// have been initialized. | 50 /// have been initialized. |
| 51 /// | 51 /// |
| 52 /// Note: the metadata is derived from the task's `metadataCollector`. The | 52 /// Note: the metadata is derived from the task's `metadataCollector`. The |
| 53 /// list must not be emitted before all operations on it are done. For | 53 /// list must not be emitted before all operations on it are done. For |
| 54 /// example, the old emitter generates metadata when emitting reflection | 54 /// example, the old emitter generates metadata when emitting reflection |
| 55 /// data. | 55 /// data. |
| 56 List<String> get metadata => _metadataCollector.globalMetadata; | 56 List<String> get metadata => _metadataCollector.globalMetadata; |
| 57 | 57 |
| 58 /// A list of pretty-printed JavaScript expressions. | |
| 59 /// | |
| 60 /// This list must be emitted in the `TYPES` embedded global. | |
| 61 /// The list references constants and must hence be emitted after constants | |
| 62 /// have been initialized. | |
| 63 /// | |
| 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 | |
| 66 /// example, the old emitter generates metadata when emitting reflection | |
| 67 /// data. | |
| 68 List<String> get metadataTypes => _metadataCollector.types; | |
| 69 | |
| 58 bool get isSplit => fragments.length > 1; | 70 bool get isSplit => fragments.length > 1; |
| 59 Iterable<Fragment> get deferredFragments => fragments.skip(1); | 71 Iterable<Fragment> get deferredFragments => fragments.skip(1); |
| 60 } | 72 } |
| 61 | 73 |
| 62 /** | 74 /** |
| 63 * This class represents a JavaScript object that contains static state, like | 75 * This class represents a JavaScript object that contains static state, like |
| 64 * classes or functions. | 76 * classes or functions. |
| 65 */ | 77 */ |
| 66 class Holder { | 78 class Holder { |
| 67 final String name; | 79 final String name; |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 466 requiredParameterCount: requiredParameterCount, | 478 requiredParameterCount: requiredParameterCount, |
| 467 optionalParameterDefaultValues: optionalParameterDefaultValues, | 479 optionalParameterDefaultValues: optionalParameterDefaultValues, |
| 468 functionType: functionType); | 480 functionType: functionType); |
| 469 } | 481 } |
| 470 | 482 |
| 471 class StaticStubMethod extends StubMethod implements StaticMethod { | 483 class StaticStubMethod extends StubMethod implements StaticMethod { |
| 472 Holder holder; | 484 Holder holder; |
| 473 StaticStubMethod(String name, this.holder, js.Expression code) | 485 StaticStubMethod(String name, this.holder, js.Expression code) |
| 474 : super(name, code); | 486 : super(name, code); |
| 475 } | 487 } |
| OLD | NEW |