| OLD | NEW |
| 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 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
| 8 | 8 |
| 9 import '../closure.dart'; | 9 import '../closure.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 5499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5510 // | 5510 // |
| 5511 // int end = a.length; | 5511 // int end = a.length; |
| 5512 // for (int i = 0; | 5512 // for (int i = 0; |
| 5513 // i < a.length; | 5513 // i < a.length; |
| 5514 // checkConcurrentModificationError(a.length == end, a), ++i) { | 5514 // checkConcurrentModificationError(a.length == end, a), ++i) { |
| 5515 // <declaredIdentifier> = a[i]; | 5515 // <declaredIdentifier> = a[i]; |
| 5516 // <body> | 5516 // <body> |
| 5517 // } | 5517 // } |
| 5518 ExecutableElement loopVariable = elements.getForInVariable(node); | 5518 ExecutableElement loopVariable = elements.getForInVariable(node); |
| 5519 SyntheticLocal indexVariable = | 5519 SyntheticLocal indexVariable = |
| 5520 new SyntheticLocal('_i', loopVariable, loopVariable.memberContext); | 5520 new SyntheticLocal('_i', loopVariable, target); |
| 5521 TypeMask boolType = commonMasks.boolType; | 5521 TypeMask boolType = commonMasks.boolType; |
| 5522 | 5522 |
| 5523 // These variables are shared by initializer, condition, body and update. | 5523 // These variables are shared by initializer, condition, body and update. |
| 5524 HInstruction array; // Set in buildInitializer. | 5524 HInstruction array; // Set in buildInitializer. |
| 5525 bool isFixed; // Set in buildInitializer. | 5525 bool isFixed; // Set in buildInitializer. |
| 5526 HInstruction originalLength = null; // Set for growable lists. | 5526 HInstruction originalLength = null; // Set for growable lists. |
| 5527 | 5527 |
| 5528 HInstruction buildGetLength() { | 5528 HInstruction buildGetLength() { |
| 5529 HInstruction result = new HGetLength(array, commonMasks.positiveIntType, | 5529 HInstruction result = new HGetLength(array, commonMasks.positiveIntType, |
| 5530 isAssignable: !isFixed); | 5530 isAssignable: !isFixed); |
| (...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6803 this.oldReturnLocal, | 6803 this.oldReturnLocal, |
| 6804 this.oldReturnType, | 6804 this.oldReturnType, |
| 6805 this.oldResolvedAst, | 6805 this.oldResolvedAst, |
| 6806 this.oldStack, | 6806 this.oldStack, |
| 6807 this.oldLocalsHandler, | 6807 this.oldLocalsHandler, |
| 6808 this.inTryStatement, | 6808 this.inTryStatement, |
| 6809 this.allFunctionsCalledOnce, | 6809 this.allFunctionsCalledOnce, |
| 6810 this.oldElementInferenceResults) | 6810 this.oldElementInferenceResults) |
| 6811 : super(function); | 6811 : super(function); |
| 6812 } | 6812 } |
| OLD | NEW |