DescriptionRewrite for-in loop on JavaScript indexable arrays as indexing loop
for (E variable in a) <body>
is generated as:
_end = a.length;
for (_i = 0; _i < a.length; a.length == _end || (0, H.throwConcurrentModificatiionError)(a), ++_i) {
variable = a[_i];
<body>;
}
or, when the list is known to be fixed length:
for (_i = 0; _i < a.length; ++_i) {
variable = a[_i];
<body>;
}
R=floitsch@google.com
Committed: https://code.google.com/p/dart/source/detail?r=45270
Reverted: https://code.google.com/p/dart/source/detail?r=45271
Committed: https://code.google.com/p/dart/source/detail?r=45309
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #
Total comments: 4
Patch Set 4 : #
Total comments: 8
Patch Set 5 : #Patch Set 6 : fix loop variable assignment #Patch Set 7 : revert #Patch Set 8 : retry #Messages
Total messages: 11 (3 generated)
|