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

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

Issue 1512303002: dart2js cps: Add instruction for bounds checks. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 '../common.dart'; 7 import '../common.dart';
8 import '../constants/values.dart'; 8 import '../constants/values.dart';
9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 @override 659 @override
660 Expression visitAwait(cps_ir.Await node) { 660 Expression visitAwait(cps_ir.Await node) {
661 return new Await(getVariableUse(node.input)); 661 return new Await(getVariableUse(node.input));
662 } 662 }
663 663
664 @override 664 @override
665 Expression visitRefinement(cps_ir.Refinement node) { 665 Expression visitRefinement(cps_ir.Refinement node) {
666 throw 'Unexpected Refinement node in tree builder'; 666 throw 'Unexpected Refinement node in tree builder';
667 } 667 }
668 668
669 @override
670 Expression visitBoundsCheck(cps_ir.BoundsCheck node) {
671 throw 'Unexpected BoundsCheck node in tree builder';
672 }
673
669 /********** UNUSED VISIT METHODS *************/ 674 /********** UNUSED VISIT METHODS *************/
670 675
671 unexpectedNode(cps_ir.Node node) { 676 unexpectedNode(cps_ir.Node node) {
672 internalError(CURRENT_ELEMENT_SPANNABLE, 'Unexpected IR node: $node'); 677 internalError(CURRENT_ELEMENT_SPANNABLE, 'Unexpected IR node: $node');
673 } 678 }
674 679
675 visitFunctionDefinition(cps_ir.FunctionDefinition node) { 680 visitFunctionDefinition(cps_ir.FunctionDefinition node) {
676 unexpectedNode(node); 681 unexpectedNode(node);
677 } 682 }
678 visitParameter(cps_ir.Parameter node) => unexpectedNode(node); 683 visitParameter(cps_ir.Parameter node) => unexpectedNode(node);
(...skipping 18 matching lines...) Expand all
697 --enclosingFunctions; 702 --enclosingFunctions;
698 } 703 }
699 704
700 @override 705 @override
701 visitInterpolatedNode(js.InterpolatedNode node) { 706 visitInterpolatedNode(js.InterpolatedNode node) {
702 if (enclosingFunctions > 0) { 707 if (enclosingFunctions > 0) {
703 found = true; 708 found = true;
704 } 709 }
705 } 710 }
706 } 711 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698