Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2968743002: Use .callMethod instead of LocalFunctionElement as key in inference (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_system.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_system.dart ('k') | pkg/compiler/lib/src/types/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698