| 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 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1872 ClassEntity closureClassEntity = closureInfo.closureClassEntity; | 1872 ClassEntity closureClassEntity = closureInfo.closureClassEntity; |
| 1873 | 1873 |
| 1874 List<HInstruction> capturedVariables = <HInstruction>[]; | 1874 List<HInstruction> capturedVariables = <HInstruction>[]; |
| 1875 closureInfo.createdFieldEntities.forEach((Local field) { | 1875 closureInfo.createdFieldEntities.forEach((Local field) { |
| 1876 assert(field != null); | 1876 assert(field != null); |
| 1877 capturedVariables.add(localsHandler.readLocal(field)); | 1877 capturedVariables.add(localsHandler.readLocal(field)); |
| 1878 }); | 1878 }); |
| 1879 | 1879 |
| 1880 TypeMask type = new TypeMask.nonNullExact(closureClassEntity, closedWorld); | 1880 TypeMask type = new TypeMask.nonNullExact(closureClassEntity, closedWorld); |
| 1881 push(new HCreate(closureClassEntity, capturedVariables, type, | 1881 push(new HCreate(closureClassEntity, capturedVariables, type, |
| 1882 callMethod: closureInfo.callMethod, localFunction: methodElement) | 1882 callMethod: closureInfo.callMethod) |
| 1883 ..sourceInformation = sourceInformationBuilder.buildCreate(node)); | 1883 ..sourceInformation = sourceInformationBuilder.buildCreate(node)); |
| 1884 } | 1884 } |
| 1885 | 1885 |
| 1886 visitFunctionDeclaration(ast.FunctionDeclaration node) { | 1886 visitFunctionDeclaration(ast.FunctionDeclaration node) { |
| 1887 assert(isReachable); | 1887 assert(isReachable); |
| 1888 visit(node.function); | 1888 visit(node.function); |
| 1889 LocalFunctionElement localFunction = | 1889 LocalFunctionElement localFunction = |
| 1890 elements.getFunctionDefinition(node.function); | 1890 elements.getFunctionDefinition(node.function); |
| 1891 localsHandler.updateLocal(localFunction, pop()); | 1891 localsHandler.updateLocal(localFunction, pop()); |
| 1892 } | 1892 } |
| (...skipping 4946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6839 this.oldReturnLocal, | 6839 this.oldReturnLocal, |
| 6840 this.oldReturnType, | 6840 this.oldReturnType, |
| 6841 this.oldResolvedAst, | 6841 this.oldResolvedAst, |
| 6842 this.oldStack, | 6842 this.oldStack, |
| 6843 this.oldLocalsHandler, | 6843 this.oldLocalsHandler, |
| 6844 this.inTryStatement, | 6844 this.inTryStatement, |
| 6845 this.allFunctionsCalledOnce, | 6845 this.allFunctionsCalledOnce, |
| 6846 this.oldElementInferenceResults) | 6846 this.oldElementInferenceResults) |
| 6847 : super(function); | 6847 : super(function); |
| 6848 } | 6848 } |
| OLD | NEW |