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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 1330503003: dart2js cps: Add path-sensitive types by inserting refinement IR nodes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Comments Created 5 years, 3 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 tree_ir_builder; 5 library tree_ir_builder;
6 6
7 import '../diagnostics/invariant.dart' show 7 import '../diagnostics/invariant.dart' show
8 InternalErrorFunction; 8 InternalErrorFunction;
9 import '../diagnostics/spannable.dart' show 9 import '../diagnostics/spannable.dart' show
10 CURRENT_ELEMENT_SPANNABLE; 10 CURRENT_ELEMENT_SPANNABLE;
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 getVariableUse(node.index), 668 getVariableUse(node.index),
669 getVariableUse(node.value)); 669 getVariableUse(node.value));
670 } 670 }
671 671
672 @override 672 @override
673 NodeCallback visitAwait(cps_ir.Await node) { 673 NodeCallback visitAwait(cps_ir.Await node) {
674 Expression value = new Await(getVariableUse(node.input)); 674 Expression value = new Await(getVariableUse(node.input));
675 return makeCallExpression(node, value); 675 return makeCallExpression(node, value);
676 } 676 }
677 677
678 @override
679 Expression visitRefinement(cps_ir.Refinement node) {
680 throw 'Unexpected Refinement node in tree builder';
681 }
682
678 /********** UNUSED VISIT METHODS *************/ 683 /********** UNUSED VISIT METHODS *************/
679 684
680 unexpectedNode(cps_ir.Node node) { 685 unexpectedNode(cps_ir.Node node) {
681 internalError(CURRENT_ELEMENT_SPANNABLE, 'Unexpected IR node: $node'); 686 internalError(CURRENT_ELEMENT_SPANNABLE, 'Unexpected IR node: $node');
682 } 687 }
683 688
684 visitFunctionDefinition(cps_ir.FunctionDefinition node) { 689 visitFunctionDefinition(cps_ir.FunctionDefinition node) {
685 unexpectedNode(node); 690 unexpectedNode(node);
686 } 691 }
687 visitParameter(cps_ir.Parameter node) => unexpectedNode(node); 692 visitParameter(cps_ir.Parameter node) => unexpectedNode(node);
688 visitContinuation(cps_ir.Continuation node) => unexpectedNode(node); 693 visitContinuation(cps_ir.Continuation node) => unexpectedNode(node);
689 visitMutableVariable(cps_ir.MutableVariable node) => unexpectedNode(node); 694 visitMutableVariable(cps_ir.MutableVariable node) => unexpectedNode(node);
690 } 695 }
691 696
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/task.dart ('k') | tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698