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

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

Issue 871243003: dart2js: store adapters in the model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/container_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d84f8ec77c3896c237569d9384597297e1289998..8532b38c46a9996a5d8157c50e43bb33d8158ca1 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -337,9 +337,17 @@ class DartMethod extends Method {
final bool canBeApplied;
final bool canBeReflected;
+ final List<AdapterStubMethod> adapterStubs;
+
+ // If this method can be torn off, contains the name of the corresponding
+ // call method. For example, for the member `foo$1$name` it would be
+ // `call$1$name` (in unminified mode).
+ final String callName;
+
DartMethod(Element element, String name, js.Expression code,
- {this.needsTearOff, this.tearOffName, this.needsStubs, this.canBeApplied,
- this.canBeReflected})
+ this.adapterStubs, this.callName,
+ {this.needsTearOff, this.tearOffName, this.needsStubs,
+ this.canBeApplied, this.canBeReflected})
: super(element, name, code) {
assert(needsTearOff != null);
assert(!needsTearOff || tearOffName != null);
@@ -354,15 +362,17 @@ class InstanceMethod extends DartMethod {
final bool hasSuperAlias;
final bool isClosure;
- InstanceMethod(element, name, code,
- {bool needsTearOff,
- String tearOffName,
- this.hasSuperAlias,
- bool canBeApplied,
- bool canBeReflected,
- this.isClosure,
- bool needsStubs})
- : super(element, name, code,
+ InstanceMethod(Element element, String name, js.Expression code,
+ List<AdapterStubMethod> adapterStubs,
+ String callName,
+ {bool needsTearOff,
+ String tearOffName,
+ this.hasSuperAlias,
+ bool canBeApplied,
+ bool canBeReflected,
+ this.isClosure,
+ bool needsStubs})
+ : super(element, name, code, adapterStubs, callName,
needsTearOff: needsTearOff,
tearOffName: tearOffName,
canBeApplied: canBeApplied,
@@ -411,10 +421,11 @@ class StaticDartMethod extends DartMethod implements StaticMethod {
final Holder holder;
StaticDartMethod(Element element, String name, this.holder,
- js.Expression code,
+ js.Expression code, List<AdapterStubMethod> adapterStubs,
+ String callName,
{bool needsTearOff, String tearOffName, bool canBeApplied,
bool canBeReflected, bool needsStubs})
- : super(element, name, code,
+ : super(element, name, code, adapterStubs, callName,
needsTearOff: needsTearOff,
tearOffName : tearOffName,
canBeApplied : canBeApplied,
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/container_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698