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

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

Issue 2897273002: Add FunctionEntity.asyncMarker and refactor SourceInformationStrategy to avoid ResolvedAst (Closed)
Patch Set: Created 3 years, 7 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/resolution/signatures.dart ('k') | pkg/compiler/lib/src/ssa/codegen.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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 : this.infoReporter = backend.compiler.dumpInfoTask, 264 : this.infoReporter = backend.compiler.dumpInfoTask,
265 this.backend = backend, 265 this.backend = backend,
266 this.constantSystem = backend.constantSystem, 266 this.constantSystem = backend.constantSystem,
267 this.rtiSubstitutions = backend.rtiSubstitutions { 267 this.rtiSubstitutions = backend.rtiSubstitutions {
268 assert(target.isImplementation); 268 assert(target.isImplementation);
269 elementInferenceResults = _resultOf(target); 269 elementInferenceResults = _resultOf(target);
270 assert(elementInferenceResults != null); 270 assert(elementInferenceResults != null);
271 graph.element = target; 271 graph.element = target;
272 sourceElementStack.add(target); 272 sourceElementStack.add(target);
273 sourceInformationBuilder = 273 sourceInformationBuilder =
274 sourceInformationFactory.createBuilderForContext(resolvedAst); 274 sourceInformationFactory.createBuilderForContext(target);
275 graph.sourceInformation = 275 graph.sourceInformation =
276 sourceInformationBuilder.buildVariableDeclaration(); 276 sourceInformationBuilder.buildVariableDeclaration();
277 localsHandler = new LocalsHandler( 277 localsHandler = new LocalsHandler(
278 this, 278 this,
279 target, 279 target,
280 target.memberContext, 280 target.memberContext,
281 target.contextClass, 281 target.contextClass,
282 null, 282 null,
283 closedWorld.nativeData, 283 closedWorld.nativeData,
284 closedWorld.interceptorData); 284 closedWorld.interceptorData);
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 return allInlinedFunctionsCalledOnce && isFunctionCalledOnce(element); 658 return allInlinedFunctionsCalledOnce && isFunctionCalledOnce(element);
659 } 659 }
660 660
661 inlinedFrom(ResolvedAst resolvedAst, f()) { 661 inlinedFrom(ResolvedAst resolvedAst, f()) {
662 MemberElement element = resolvedAst.element; 662 MemberElement element = resolvedAst.element;
663 assert(element is FunctionElement || element is VariableElement); 663 assert(element is FunctionElement || element is VariableElement);
664 return reporter.withCurrentElement(element.implementation, () { 664 return reporter.withCurrentElement(element.implementation, () {
665 // The [sourceElementStack] contains declaration elements. 665 // The [sourceElementStack] contains declaration elements.
666 SourceInformationBuilder oldSourceInformationBuilder = 666 SourceInformationBuilder oldSourceInformationBuilder =
667 sourceInformationBuilder; 667 sourceInformationBuilder;
668 sourceInformationBuilder = 668 sourceInformationBuilder = sourceInformationBuilder.forContext(element);
669 sourceInformationBuilder.forContext(resolvedAst);
670 sourceElementStack.add(element.declaration); 669 sourceElementStack.add(element.declaration);
671 var result = f(); 670 var result = f();
672 sourceInformationBuilder = oldSourceInformationBuilder; 671 sourceInformationBuilder = oldSourceInformationBuilder;
673 sourceElementStack.removeLast(); 672 sourceElementStack.removeLast();
674 return result; 673 return result;
675 }); 674 });
676 } 675 }
677 676
678 /** 677 /**
679 * Return null so it is simple to remove the optional parameters completely 678 * Return null so it is simple to remove the optional parameters completely
(...skipping 6121 matching lines...) Expand 10 before | Expand all | Expand 10 after
6801 this.oldReturnLocal, 6800 this.oldReturnLocal,
6802 this.oldReturnType, 6801 this.oldReturnType,
6803 this.oldResolvedAst, 6802 this.oldResolvedAst,
6804 this.oldStack, 6803 this.oldStack,
6805 this.oldLocalsHandler, 6804 this.oldLocalsHandler,
6806 this.inTryStatement, 6805 this.inTryStatement,
6807 this.allFunctionsCalledOnce, 6806 this.allFunctionsCalledOnce,
6808 this.oldElementInferenceResults) 6807 this.oldElementInferenceResults)
6809 : super(function); 6808 : super(function);
6810 } 6809 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/signatures.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698