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

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

Issue 2968383002: Add ConstructorBodyEntity (Closed)
Patch Set: Skip non-live constructor bodies 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
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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 618
619 return false; 619 return false;
620 } 620 }
621 621
622 bool get allInlinedFunctionsCalledOnce { 622 bool get allInlinedFunctionsCalledOnce {
623 return inliningStack.isEmpty || inliningStack.last.allFunctionsCalledOnce; 623 return inliningStack.isEmpty || inliningStack.last.allFunctionsCalledOnce;
624 } 624 }
625 625
626 bool isFunctionCalledOnce(MethodElement element) { 626 bool isFunctionCalledOnce(MethodElement element) {
627 // ConstructorBodyElements are not in the type inference graph. 627 // ConstructorBodyElements are not in the type inference graph.
628 if (element is ConstructorBodyElement) return false; 628 if (element is ConstructorBodyEntity) return false;
629 return globalInferenceResults.resultOfMember(element).isCalledOnce; 629 return globalInferenceResults.resultOfMember(element).isCalledOnce;
630 } 630 }
631 631
632 bool isCalledOnce(MethodElement element) { 632 bool isCalledOnce(MethodElement element) {
633 assert(element.isDeclaration); 633 assert(element.isDeclaration);
634 return allInlinedFunctionsCalledOnce && isFunctionCalledOnce(element); 634 return allInlinedFunctionsCalledOnce && isFunctionCalledOnce(element);
635 } 635 }
636 636
637 inlinedFrom(ResolvedAst resolvedAst, f()) { 637 inlinedFrom(ResolvedAst resolvedAst, f()) {
638 MemberElement element = resolvedAst.element; 638 MemberElement element = resolvedAst.element;
(...skipping 6206 matching lines...) Expand 10 before | Expand all | Expand 10 after
6845 this.oldReturnLocal, 6845 this.oldReturnLocal,
6846 this.oldReturnType, 6846 this.oldReturnType,
6847 this.oldResolvedAst, 6847 this.oldResolvedAst,
6848 this.oldStack, 6848 this.oldStack,
6849 this.oldLocalsHandler, 6849 this.oldLocalsHandler,
6850 this.inTryStatement, 6850 this.inTryStatement,
6851 this.allFunctionsCalledOnce, 6851 this.allFunctionsCalledOnce,
6852 this.oldElementInferenceResults) 6852 this.oldElementInferenceResults)
6853 : super(function); 6853 : super(function);
6854 } 6854 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution_strategy.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698