| 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; | 7 import '../js/js.dart' as js show Expression; |
| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 * A method that is generated by the backend and has not direct correspondence | 360 * A method that is generated by the backend and has not direct correspondence |
| 361 * to a method in the original Dart program. Examples are getter and setter | 361 * to a method in the original Dart program. Examples are getter and setter |
| 362 * stubs and stubs to dispatch calls to methods with optional parameters. | 362 * stubs and stubs to dispatch calls to methods with optional parameters. |
| 363 */ | 363 */ |
| 364 class StubMethod extends Method { | 364 class StubMethod extends Method { |
| 365 StubMethod(String name, js.Expression code, | 365 StubMethod(String name, js.Expression code, |
| 366 {Element element}) | 366 {Element element}) |
| 367 : super(element, name, code); | 367 : super(element, name, code); |
| 368 } | 368 } |
| 369 | 369 |
| 370 class StaticMethod extends DartMethod { | 370 abstract class StaticMethod implements Method { |
| 371 Holder get holder; |
| 372 } |
| 373 |
| 374 class StaticDartMethod extends DartMethod implements StaticMethod { |
| 371 final Holder holder; | 375 final Holder holder; |
| 372 StaticMethod(Element element, String name, this.holder, js.Expression code, | 376 |
| 373 {bool needsTearOff, String tearOffName, bool canBeApplied, | 377 StaticDartMethod(Element element, String name, this.holder, |
| 374 bool canBeReflected, bool needsStubs}) | 378 js.Expression code, |
| 379 {bool needsTearOff, String tearOffName, bool canBeApplied, |
| 380 bool canBeReflected, bool needsStubs}) |
| 375 : super(element, name, code, | 381 : super(element, name, code, |
| 376 needsTearOff: needsTearOff, | 382 needsTearOff: needsTearOff, |
| 377 tearOffName : tearOffName, | 383 tearOffName : tearOffName, |
| 378 canBeApplied : canBeApplied, | 384 canBeApplied : canBeApplied, |
| 379 canBeReflected : canBeReflected, | 385 canBeReflected : canBeReflected, |
| 380 needsStubs : needsStubs); | 386 needsStubs : needsStubs); |
| 381 } | 387 } |
| 382 | 388 |
| 383 class StaticStubMethod extends StubMethod { | 389 class StaticStubMethod extends StubMethod implements StaticMethod { |
| 384 Holder holder; | 390 Holder holder; |
| 385 StaticStubMethod(String name, this.holder, js.Expression code) | 391 StaticStubMethod(String name, this.holder, js.Expression code) |
| 386 : super(name, code); | 392 : super(name, code); |
| 387 } | 393 } |
| OLD | NEW |