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

Side by Side Diff: lib/compiler/implementation/js_backend/backend.dart

Issue 10827353: Fix a performance regressions introduced by r10632. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up FunctionElement.isInstanceMember and remove redundent code. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/elements/elements.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class InvocationInfo { 5 class InvocationInfo {
6 int parameterCount = -1; 6 int parameterCount = -1;
7 List<HType> providedTypes; 7 List<HType> providedTypes;
8 List<Element> compiledFunctions; 8 List<Element> compiledFunctions;
9 9
10 InvocationInfo(HInvoke node, HTypeMap types) 10 InvocationInfo(HInvoke node, HTypeMap types)
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 HType optimisticFieldTypeAfterConstruction(Element field) { 198 HType optimisticFieldTypeAfterConstruction(Element field) {
199 assert(field.isField()); 199 assert(field.isField());
200 assert(field.isMember()); 200 assert(field.isMember());
201 201
202 ClassElement classElement = field.getEnclosingClass(); 202 ClassElement classElement = field.getEnclosingClass();
203 if (hasConstructorBodyFieldSetter(field)) { 203 if (hasConstructorBodyFieldSetter(field)) {
204 // If there are field setters but there is only constructor then the type 204 // If there are field setters but there is only constructor then the type
205 // of the field is determined by the assignments in the constructor 205 // of the field is determined by the assignments in the constructor
206 // body. 206 // body.
207 var constructors = classElement.constructors; 207 var constructors = classElement.constructors;
208 if (constructors.head !== null && constructors.tail === null) { 208 if (constructors.head !== null && constructors.tail.isEmpty()) {
209 return fieldConstructorSetters[classElement][field]; 209 return fieldConstructorSetters[classElement][field];
210 } else { 210 } else {
211 return HType.UNKNOWN; 211 return HType.UNKNOWN;
212 } 212 }
213 } else if (fieldInitializers.containsKey(classElement)) { 213 } else if (fieldInitializers.containsKey(classElement)) {
214 HType type = fieldInitializers[classElement][field]; 214 HType type = fieldInitializers[classElement][field];
215 return type == null ? HType.CONFLICTING : type; 215 return type == null ? HType.CONFLICTING : type;
216 } else { 216 } else {
217 return HType.CONFLICTING; 217 return HType.CONFLICTING;
218 } 218 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 FunctionSignature signature = element.computeSignature(compiler); 346 FunctionSignature signature = element.computeSignature(compiler);
347 if (signature.parameterCount == found.parameterCount) { 347 if (signature.parameterCount == found.parameterCount) {
348 found.addCompiledFunction(element); 348 found.addCompiledFunction(element);
349 return found.providedTypes; 349 return found.providedTypes;
350 } 350 }
351 } 351 }
352 return null; 352 return null;
353 } 353 }
354 } 354 }
355 } 355 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/elements/elements.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698