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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 return graph.addConstant(getConstantForNode(node), closedWorld); | 699 return graph.addConstant(getConstantForNode(node), closedWorld); |
700 } | 700 } |
701 | 701 |
702 /** | 702 /** |
703 * Documentation wanted -- johnniwinther | 703 * Documentation wanted -- johnniwinther |
704 * | 704 * |
705 * Invariant: [functionElement] must be an implementation element. | 705 * Invariant: [functionElement] must be an implementation element. |
706 */ | 706 */ |
707 HGraph buildMethod(MethodElement functionElement) { | 707 HGraph buildMethod(MethodElement functionElement) { |
708 assert(functionElement.isImplementation, failedAt(functionElement)); | 708 assert(functionElement.isImplementation, failedAt(functionElement)); |
709 graph.calledInLoop = | 709 MethodElement declaration = functionElement.declaration; |
710 closedWorld.isCalledInLoop(functionElement.declaration); | 710 graph.calledInLoop = closedWorld.isCalledInLoop(declaration); |
711 ast.FunctionExpression function = resolvedAst.node; | 711 ast.FunctionExpression function = resolvedAst.node; |
712 assert(function != null); | 712 assert(function != null); |
713 assert(elements.getFunctionDefinition(function) != null); | 713 assert(elements.getFunctionDefinition(function) != null); |
714 openFunction(functionElement, function); | 714 openFunction(functionElement, function); |
715 String name = functionElement.name; | 715 String name = functionElement.name; |
716 if (nativeData.isJsInteropMember(functionElement)) { | 716 if (nativeData.isJsInteropMember(functionElement)) { |
717 push(invokeJsInteropFunction(functionElement, parameters.values.toList(), | 717 push(invokeJsInteropFunction(functionElement, parameters.values.toList(), |
718 sourceInformationBuilder.buildGeneric(function))); | 718 sourceInformationBuilder.buildGeneric(function))); |
719 var value = pop(); | 719 var value = pop(); |
720 closeAndGotoExit(new HReturn( | 720 closeAndGotoExit(new HReturn( |
(...skipping 6123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6844 this.oldReturnLocal, | 6844 this.oldReturnLocal, |
6845 this.oldReturnType, | 6845 this.oldReturnType, |
6846 this.oldResolvedAst, | 6846 this.oldResolvedAst, |
6847 this.oldStack, | 6847 this.oldStack, |
6848 this.oldLocalsHandler, | 6848 this.oldLocalsHandler, |
6849 this.inTryStatement, | 6849 this.inTryStatement, |
6850 this.allFunctionsCalledOnce, | 6850 this.allFunctionsCalledOnce, |
6851 this.oldElementInferenceResults) | 6851 this.oldElementInferenceResults) |
6852 : super(function); | 6852 : super(function); |
6853 } | 6853 } |
OLD | NEW |