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

Unified Diff: pkg/compiler/lib/src/js_model/elements.dart

Issue 2991903002: Add Closure call method to created closure class (Closed)
Patch Set: . Created 3 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_model/elements.dart
diff --git a/pkg/compiler/lib/src/js_model/elements.dart b/pkg/compiler/lib/src/js_model/elements.dart
index e7fa466fc4c339209a206e5b3ea3938ab2ec6252..9ac1e4d33c35a63fa3f09320fa9e62dd933f93aa 100644
--- a/pkg/compiler/lib/src/js_model/elements.dart
+++ b/pkg/compiler/lib/src/js_model/elements.dart
@@ -4,11 +4,13 @@
library dart2js.js_model.elements;
+import '../common/names.dart' show Identifiers;
import '../elements/entities.dart';
import '../elements/names.dart';
import '../elements/types.dart';
import '../kernel/elements.dart';
import '../kernel/element_map_impl.dart';
+import 'closure.dart' show KernelClosureClass;
/// Map from 'frontend' to 'backend' elements.
///
@@ -518,6 +520,20 @@ class JField extends JMember implements FieldEntity, IndexedField {
String get _kind => 'field';
}
+class ClosureCall extends JFunction {
sra1 2017/07/28 22:09:40 I think 'JClosureCallMethod' or 'JClosureFunction'
Emily Fortuna 2017/07/28 23:17:08 fixed.
+ ClosureCall(int memberIndex, KernelClosureClass containingClass,
+ JFunction origClosureCall)
+ : super(
+ memberIndex,
+ containingClass.library,
+ containingClass,
+ new Name(Identifiers.call, containingClass.library),
+ origClosureCall.parameterStructure,
+ origClosureCall.asyncMarker);
+
+ String get _kind => 'closure_call';
+}
+
class JTypeVariable implements TypeVariableEntity, IndexedTypeVariable {
final int typeVariableIndex;
final Entity typeDeclaration;

Powered by Google App Engine
This is Rietveld 408576698