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

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: 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
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) 10 InvocationInfo(HInvoke node)
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 HType optimisticFieldTypeAfterConstruction(Element field) { 188 HType optimisticFieldTypeAfterConstruction(Element field) {
189 assert(field.isField()); 189 assert(field.isField());
190 assert(field.isMember()); 190 assert(field.isMember());
191 191
192 ClassElement classElement = field.getEnclosingClass(); 192 ClassElement classElement = field.getEnclosingClass();
193 if (hasConstructorBodyFieldSetter(field)) { 193 if (hasConstructorBodyFieldSetter(field)) {
194 // If there are field setters but there is only constructor then the type 194 // If there are field setters but there is only constructor then the type
195 // of the field is determined by the assignments in the constructor 195 // of the field is determined by the assignments in the constructor
196 // body. 196 // body.
197 var constructors = classElement.constructors; 197 var constructors = classElement.constructors;
198 if (constructors.head !== null && constructors.tail === null) { 198 if (constructors.head !== null && constructors.tail.isEmpty()) {
199 return fieldConstructorSetters[classElement][field]; 199 return fieldConstructorSetters[classElement][field];
200 } else { 200 } else {
201 return HType.UNKNOWN; 201 return HType.UNKNOWN;
202 } 202 }
203 } else if (fieldInitializers.containsKey(classElement)) { 203 } else if (fieldInitializers.containsKey(classElement)) {
204 HType type = fieldInitializers[classElement][field]; 204 HType type = fieldInitializers[classElement][field];
205 return type == null ? HType.CONFLICTING : type; 205 return type == null ? HType.CONFLICTING : type;
206 } else { 206 } else {
207 return HType.CONFLICTING; 207 return HType.CONFLICTING;
208 } 208 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 FunctionSignature signature = element.computeSignature(compiler); 334 FunctionSignature signature = element.computeSignature(compiler);
335 if (signature.parameterCount == found.parameterCount) { 335 if (signature.parameterCount == found.parameterCount) {
336 found.addCompiledFunction(element); 336 found.addCompiledFunction(element);
337 return found.providedTypes; 337 return found.providedTypes;
338 } 338 }
339 } 339 }
340 return null; 340 return null;
341 } 341 }
342 } 342 }
343 } 343 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698