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

Side by Side Diff: pkg/compiler/lib/src/js_model/elements.dart

Issue 3004433002: Encapsulate the index based maps for entities. (Closed)
Patch Set: Created 3 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.js_model.elements; 5 library dart2js.js_model.elements;
6 6
7 import '../common/names.dart' show Names; 7 import '../common/names.dart' show Names;
8 import '../elements/entities.dart'; 8 import '../elements/entities.dart';
9 import '../elements/names.dart'; 9 import '../elements/names.dart';
10 import '../elements/types.dart'; 10 import '../elements/types.dart';
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 {bool isExternal, 131 {bool isExternal,
132 bool isConst, 132 bool isConst,
133 bool isFromEnvironmentConstructor}) { 133 bool isFromEnvironmentConstructor}) {
134 return new JFactoryConstructor( 134 return new JFactoryConstructor(
135 memberIndex, enclosingClass, name, parameterStructure, 135 memberIndex, enclosingClass, name, parameterStructure,
136 isExternal: isExternal, 136 isExternal: isExternal,
137 isConst: isConst, 137 isConst: isConst,
138 isFromEnvironmentConstructor: isFromEnvironmentConstructor); 138 isFromEnvironmentConstructor: isFromEnvironmentConstructor);
139 } 139 }
140 140
141 ConstructorBodyEntity createConstructorBody( 141 JConstructorBody createConstructorBody(
142 int memberIndex, ConstructorEntity constructor) { 142 int memberIndex, ConstructorEntity constructor) {
143 return new JConstructorBody(memberIndex, constructor); 143 return new JConstructorBody(memberIndex, constructor);
144 } 144 }
145 145
146 IndexedFunction createGetter(int memberIndex, LibraryEntity library, 146 IndexedFunction createGetter(int memberIndex, LibraryEntity library,
147 ClassEntity enclosingClass, Name name, AsyncMarker asyncMarker, 147 ClassEntity enclosingClass, Name name, AsyncMarker asyncMarker,
148 {bool isStatic, bool isExternal, bool isAbstract}) { 148 {bool isStatic, bool isExternal, bool isAbstract}) {
149 return new JGetter(memberIndex, library, enclosingClass, name, asyncMarker, 149 return new JGetter(memberIndex, library, enclosingClass, name, asyncMarker,
150 isStatic: isStatic, isExternal: isExternal, isAbstract: isAbstract); 150 isStatic: isStatic, isExternal: isExternal, isAbstract: isAbstract);
151 } 151 }
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 final Entity typeDeclaration; 566 final Entity typeDeclaration;
567 final String name; 567 final String name;
568 final int index; 568 final int index;
569 569
570 JTypeVariable( 570 JTypeVariable(
571 this.typeVariableIndex, this.typeDeclaration, this.name, this.index); 571 this.typeVariableIndex, this.typeDeclaration, this.name, this.index);
572 572
573 String toString() => 573 String toString() =>
574 '${jsElementPrefix}type_variable(${typeDeclaration.name}.$name)'; 574 '${jsElementPrefix}type_variable(${typeDeclaration.name}.$name)';
575 } 575 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('j') | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698