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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart

Issue 3002953002: Split getClosureRepresentationInfo into MemberEntity and (ir/ast) nodes (Closed)
Patch Set: Update cf. comments Created 3 years, 4 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_emitter.runtime_type_generator; 5 library dart2js.js_emitter.runtime_type_generator;
6 6
7 import '../closure.dart' 7 import '../closure.dart'
8 show ClosureRepresentationInfo, ClosureFieldElement, ClosureConversionTask; 8 show ClosureRepresentationInfo, ClosureFieldElement, ClosureConversionTask;
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/names.dart' show Identifiers; 10 import '../common/names.dart' show Identifiers;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 result.addIsTest(other, _namer.operatorIs(other), js('1')); 168 result.addIsTest(other, _namer.operatorIs(other), js('1'));
169 } 169 }
170 } 170 }
171 171
172 void generateFunctionTypeSignature( 172 void generateFunctionTypeSignature(
173 FunctionEntity method, FunctionType type) { 173 FunctionEntity method, FunctionType type) {
174 assert(!(method is MethodElement && !method.isImplementation)); 174 assert(!(method is MethodElement && !method.isImplementation));
175 jsAst.Expression thisAccess = new jsAst.This(); 175 jsAst.Expression thisAccess = new jsAst.This();
176 if (!method.isAbstract) { 176 if (!method.isAbstract) {
177 ClosureRepresentationInfo closureData = 177 ClosureRepresentationInfo closureData =
178 _closureDataLookup.getClosureRepresentationInfo(method); 178 _closureDataLookup.getClosureInfoForMember(method);
179 if (closureData != null) { 179 if (closureData != null) {
180 ClosureFieldElement thisLocal = closureData.thisFieldEntity; 180 ClosureFieldElement thisLocal = closureData.thisFieldEntity;
181 if (thisLocal != null) { 181 if (thisLocal != null) {
182 jsAst.Name thisName = _namer.instanceFieldPropertyName(thisLocal); 182 jsAst.Name thisName = _namer.instanceFieldPropertyName(thisLocal);
183 thisAccess = js('this.#', thisName); 183 thisAccess = js('this.#', thisName);
184 } 184 }
185 } 185 }
186 } 186 }
187 187
188 if (storeFunctionTypeInMetadata && !type.containsTypeVariables) { 188 if (storeFunctionTypeInMetadata && !type.containsTypeVariables) {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 389
390 // We need to also emit "is checks" for the superclass and its supertypes. 390 // We need to also emit "is checks" for the superclass and its supertypes.
391 ClassEntity superclass = _elementEnvironment.getSuperClass(cls); 391 ClassEntity superclass = _elementEnvironment.getSuperClass(cls);
392 if (superclass != null) { 392 if (superclass != null) {
393 tryEmitTest(superclass); 393 tryEmitTest(superclass);
394 _generateInterfacesIsTests( 394 _generateInterfacesIsTests(
395 superclass, generateIsTest, generateSubstitution, alreadyGenerated); 395 superclass, generateIsTest, generateSubstitution, alreadyGenerated);
396 } 396 }
397 } 397 }
398 } 398 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder_kernel.dart ('k') | pkg/compiler/lib/src/js_model/closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698