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

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

Issue 2981673002: Register created closure class with the world. (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
« no previous file with comments | « pkg/compiler/lib/src/js_model/closure_visitors.dart ('k') | pkg/compiler/lib/src/js_model/js_strategy.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b040bc03530df2897945eacc73f8059d00381e65..1d02a1aa45a59a113f88bc04250c3e86298b259e 100644
--- a/pkg/compiler/lib/src/js_model/elements.dart
+++ b/pkg/compiler/lib/src/js_model/elements.dart
@@ -323,16 +323,24 @@ class JClass implements ClassEntity, IndexedClass {
abstract class JMember implements MemberEntity, IndexedMember {
/// Member index used for fast lookup in [JsToFrontendMapImpl].
- final int memberIndex;
+ int _memberIndex;
final JLibrary library;
final JClass enclosingClass;
final Name _name;
final bool _isStatic;
- JMember(this.memberIndex, this.library, this.enclosingClass, this._name,
+ JMember(this._memberIndex, this.library, this.enclosingClass, this._name,
{bool isStatic: false})
: _isStatic = isStatic;
+ int get memberIndex => _memberIndex;
+
+ /// Should only be called by closure methods. All others should set
+ /// memberIndex at initialization time.
+ void set setClosureMemberIndex(int newIndex) {
+ _memberIndex = newIndex;
+ }
+
String get name => _name.text;
Name get memberName => _name;
« no previous file with comments | « pkg/compiler/lib/src/js_model/closure_visitors.dart ('k') | pkg/compiler/lib/src/js_model/js_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698