Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: pkg/compiler/lib/src/js_emitter/model.dart

Issue 1229923005: dart2js: support tear-offs in the startup emitter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Reupload Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_emitter/model.dart
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index a76c63a45979dd96bc40cc8cf6d2f9f8d3be9e34..590d5cc81c7d3921ccac4b441b8adebe5d5251cf 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -369,7 +369,7 @@ abstract class Method {
}
/// A method that corresponds to a method in the original Dart program.
-class DartMethod extends Method {
+abstract class DartMethod extends Method {
final bool needsTearOff;
final js.Name tearOffName;
final List<ParameterStubMethod> parameterStubs;
@@ -407,6 +407,8 @@ class DartMethod extends Method {
(requiredParameterCount != null &&
optionalParameterDefaultValues != null));
}
+
+ bool get isStatic;
}
class InstanceMethod extends DartMethod {
@@ -440,6 +442,8 @@ class InstanceMethod extends DartMethod {
functionType: functionType) {
assert(isClosure != null);
}
+
+ bool get isStatic => false;
}
/// A method that is generated by the backend and has not direct correspondence
@@ -495,6 +499,8 @@ class StaticDartMethod extends DartMethod implements StaticMethod {
requiredParameterCount: requiredParameterCount,
optionalParameterDefaultValues: optionalParameterDefaultValues,
functionType: functionType);
+
+ bool get isStatic => true;
}
class StaticStubMethod extends StubMethod implements StaticMethod {

Powered by Google App Engine
This is Rietveld 408576698