| 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, Name, Literal, | 7 import '../js/js.dart' as js show Expression, Statement, Name, Literal, |
| 8 TokenFinalizer; | 8 TokenFinalizer; |
| 9 import '../constants/values.dart' show ConstantValue; | 9 import '../constants/values.dart' show ConstantValue; |
| 10 | 10 |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 bool get needsUncheckedSetter => setterFlags != 0; | 360 bool get needsUncheckedSetter => setterFlags != 0; |
| 361 | 361 |
| 362 bool get needsInterceptedGetter => getterFlags > 1; | 362 bool get needsInterceptedGetter => getterFlags > 1; |
| 363 bool get needsInterceptedSetter => setterFlags > 1; | 363 bool get needsInterceptedSetter => setterFlags > 1; |
| 364 } | 364 } |
| 365 | 365 |
| 366 abstract class Method { | 366 abstract class Method { |
| 367 /// The element should only be used during the transition to the new model. | 367 /// The element should only be used during the transition to the new model. |
| 368 /// Uses indicate missing information in the model. | 368 /// Uses indicate missing information in the model. |
| 369 final Element element; | 369 final Element element; |
| 370 /// The name of the method. If the method is a [ParameterStubMethod] for a |
| 371 /// static function, then the name can be `null`. In that case, only the |
| 372 /// [ParameterStubMethod.callName] should be used. |
| 370 final js.Name name; | 373 final js.Name name; |
| 371 final js.Expression code; | 374 final js.Expression code; |
| 372 | 375 |
| 373 Method(this.element, this.name, this.code); | 376 Method(this.element, this.name, this.code); |
| 374 } | 377 } |
| 375 | 378 |
| 376 /// A method that corresponds to a method in the original Dart program. | 379 /// A method that corresponds to a method in the original Dart program. |
| 377 class DartMethod extends Method { | 380 class DartMethod extends Method { |
| 378 final bool needsTearOff; | 381 final bool needsTearOff; |
| 379 final js.Name tearOffName; | 382 final js.Name tearOffName; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 requiredParameterCount: requiredParameterCount, | 503 requiredParameterCount: requiredParameterCount, |
| 501 optionalParameterDefaultValues: optionalParameterDefaultValues, | 504 optionalParameterDefaultValues: optionalParameterDefaultValues, |
| 502 functionType: functionType); | 505 functionType: functionType); |
| 503 } | 506 } |
| 504 | 507 |
| 505 class StaticStubMethod extends StubMethod implements StaticMethod { | 508 class StaticStubMethod extends StubMethod implements StaticMethod { |
| 506 Holder holder; | 509 Holder holder; |
| 507 StaticStubMethod(js.Name name, this.holder, js.Expression code) | 510 StaticStubMethod(js.Name name, this.holder, js.Expression code) |
| 508 : super(name, code); | 511 : super(name, code); |
| 509 } | 512 } |
| OLD | NEW |