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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 2015513003: Optimize more megamorphic dispatch sites (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 7dbf6e42c99492dbe9054a776fd77d0869c52b5e..d9ccc1186c5eb24ec4c00a65ffbc08fde7bc548d 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -7194,7 +7194,10 @@ class ResolverVisitor extends ScopedVisitor {
* Try to infer types of parameters of the [FunctionExpression] arguments.
*/
void _inferFunctionExpressionsParametersTypes(ArgumentList argumentList) {
- for (Expression argument in argumentList.arguments) {
+ NodeList<Expression> arguments = argumentList.arguments;
+ int length = arguments.length;
+ for (int i = 0; i < length; i++) {
+ Expression argument = arguments[i];
ParameterElement parameter = argument.propagatedParameterElement;
if (parameter == null) {
parameter = argument.staticParameterElement;
@@ -9940,7 +9943,10 @@ class TypeResolverVisitor extends ScopedVisitor {
// types of field formal parameters can be correctly resolved.
//
List<ClassMember> nonFields = new List<ClassMember>();
- for (ClassMember member in node.members) {
+ NodeList<ClassMember> members = node.members;
+ int length = members.length;
+ for (int i = 0; i < length; i++) {
+ ClassMember member = members[i];
if (member is ConstructorDeclaration) {
nonFields.add(member);
} else {

Powered by Google App Engine
This is Rietveld 408576698