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

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: Fix bad assert. 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 1c147e146bd548fa09d58105ac66e213c4864a5e..be6919d74a893f8ed9c67a9cf21769b0ebd03d1d 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -380,7 +380,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;
@@ -418,6 +418,8 @@ class DartMethod extends Method {
(requiredParameterCount != null &&
optionalParameterDefaultValues != null));
}
+
+ bool get isStatic;
}
class InstanceMethod extends DartMethod {
@@ -451,6 +453,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
@@ -506,6 +510,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