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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart

Issue 1560433003: dart2js cps: Fix some analyzer hints in the CPS backend. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rebase Created 4 years, 11 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library dart2js.ir_builder; 5 library dart2js.ir_builder;
6 6
7 import '../closure.dart' hide ClosureScope; 7 import '../closure.dart' hide ClosureScope;
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/names.dart' show 9 import '../common/names.dart' show
10 Names, 10 Names,
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 _current = _current.plug(expr); 646 _current = _current.plug(expr);
647 } 647 }
648 } 648 }
649 649
650 /// Create and add a new [LetPrim] for [primitive]. 650 /// Create and add a new [LetPrim] for [primitive].
651 ir.Primitive addPrimitive(ir.Primitive primitive) { 651 ir.Primitive addPrimitive(ir.Primitive primitive) {
652 add(new ir.LetPrim(primitive)); 652 add(new ir.LetPrim(primitive));
653 return primitive; 653 return primitive;
654 } 654 }
655 655
656 ir.Primitive _continueWithExpression(ir.Expression build(ir.Continuation k)) {
657 ir.Parameter v = new ir.Parameter(null);
658 ir.Continuation k = new ir.Continuation([v]);
659 ir.Expression expression = build(k);
660 add(new ir.LetCont(k, expression));
661 return v;
662 }
663
664 ir.Primitive _buildInvokeStatic(Element element, 656 ir.Primitive _buildInvokeStatic(Element element,
665 Selector selector, 657 Selector selector,
666 List<ir.Primitive> arguments, 658 List<ir.Primitive> arguments,
667 SourceInformation sourceInformation) { 659 SourceInformation sourceInformation) {
668 assert(!element.isLocal); 660 assert(!element.isLocal);
669 assert(!element.isInstanceMember); 661 assert(!element.isInstanceMember);
670 assert(isOpen); 662 assert(isOpen);
671 return addPrimitive( 663 return addPrimitive(
672 new ir.InvokeStatic(element, selector, arguments, sourceInformation)); 664 new ir.InvokeStatic(element, selector, arguments, sourceInformation));
673 } 665 }
(...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2924 } 2916 }
2925 2917
2926 class SwitchCaseInfo { 2918 class SwitchCaseInfo {
2927 final List<ir.Primitive> constants = <ir.Primitive>[]; 2919 final List<ir.Primitive> constants = <ir.Primitive>[];
2928 final SubbuildFunction buildBody; 2920 final SubbuildFunction buildBody;
2929 2921
2930 SwitchCaseInfo(this.buildBody); 2922 SwitchCaseInfo(this.buildBody);
2931 2923
2932 void addConstant(ir.Primitive constant) => constants.add(constant); 2924 void addConstant(ir.Primitive constant) => constants.add(constant);
2933 } 2925 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/bounds_checker.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698