| 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 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1859 block.addAtExit(new HBreak.toLabel(label)); | 1859 block.addAtExit(new HBreak.toLabel(label)); |
| 1860 block.remove(breakInstruction); | 1860 block.remove(breakInstruction); |
| 1861 }); | 1861 }); |
| 1862 } | 1862 } |
| 1863 } | 1863 } |
| 1864 jumpHandler.close(); | 1864 jumpHandler.close(); |
| 1865 loopDepth--; | 1865 loopDepth--; |
| 1866 } | 1866 } |
| 1867 | 1867 |
| 1868 visitFunctionExpression(ast.FunctionExpression node) { | 1868 visitFunctionExpression(ast.FunctionExpression node) { |
| 1869 LocalFunctionElement methodElement = elements[node]; | |
| 1870 ClosureRepresentationInfo closureInfo = | 1869 ClosureRepresentationInfo closureInfo = |
| 1871 closureDataLookup.getClosureRepresentationInfo(methodElement); | 1870 closureDataLookup.getClosureInfo(node); |
| 1872 ClassEntity closureClassEntity = closureInfo.closureClassEntity; | 1871 ClassEntity closureClassEntity = closureInfo.closureClassEntity; |
| 1873 | 1872 |
| 1874 List<HInstruction> capturedVariables = <HInstruction>[]; | 1873 List<HInstruction> capturedVariables = <HInstruction>[]; |
| 1875 closureInfo.createdFieldEntities.forEach((Local field) { | 1874 closureInfo.createdFieldEntities.forEach((Local field) { |
| 1876 assert(field != null); | 1875 assert(field != null); |
| 1877 capturedVariables.add(localsHandler.readLocal(field)); | 1876 capturedVariables.add(localsHandler.readLocal(field)); |
| 1878 }); | 1877 }); |
| 1879 | 1878 |
| 1880 TypeMask type = new TypeMask.nonNullExact(closureClassEntity, closedWorld); | 1879 TypeMask type = new TypeMask.nonNullExact(closureClassEntity, closedWorld); |
| 1881 push(new HCreate(closureClassEntity, capturedVariables, type, | 1880 push(new HCreate(closureClassEntity, capturedVariables, type, |
| (...skipping 4958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6840 this.oldReturnLocal, | 6839 this.oldReturnLocal, |
| 6841 this.oldReturnType, | 6840 this.oldReturnType, |
| 6842 this.oldResolvedAst, | 6841 this.oldResolvedAst, |
| 6843 this.oldStack, | 6842 this.oldStack, |
| 6844 this.oldLocalsHandler, | 6843 this.oldLocalsHandler, |
| 6845 this.inTryStatement, | 6844 this.inTryStatement, |
| 6846 this.allFunctionsCalledOnce, | 6845 this.allFunctionsCalledOnce, |
| 6847 this.oldElementInferenceResults) | 6846 this.oldElementInferenceResults) |
| 6848 : super(function); | 6847 : super(function); |
| 6849 } | 6848 } |
| OLD | NEW |