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

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

Issue 1223813006: dart2js cps: Direct access on JS arrays. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update unit tests and remove unused functions Created 5 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) 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 dart2js.cps_ir.shrinking_reductions; 5 library dart2js.cps_ir.shrinking_reductions;
6 6
7 import 'cps_ir_nodes.dart'; 7 import 'cps_ir_nodes.dart';
8 import 'optimizers.dart'; 8 import 'optimizers.dart';
9 9
10 /** 10 /**
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 processApplyBuiltinOperator(ApplyBuiltinOperator node) { 669 processApplyBuiltinOperator(ApplyBuiltinOperator node) {
670 node.arguments.forEach((Reference ref) => ref.parent = node); 670 node.arguments.forEach((Reference ref) => ref.parent = node);
671 } 671 }
672 672
673 processForeignCode(ForeignCode node) { 673 processForeignCode(ForeignCode node) {
674 if (node.continuation != null) { 674 if (node.continuation != null) {
675 node.continuation.parent = node; 675 node.continuation.parent = node;
676 } 676 }
677 node.arguments.forEach((Reference ref) => ref.parent = node); 677 node.arguments.forEach((Reference ref) => ref.parent = node);
678 } 678 }
679
680 processGetLength(GetLength node) {
681 node.object.parent = node;
682 }
683
684 processGetIndex(GetIndex node) {
685 node.object.parent = node;
686 node.index.parent = node;
687 }
688
689 processSetIndex(SetIndex node) {
690 node.object.parent = node;
691 node.index.parent = node;
692 node.value.parent = node;
693 }
679 } 694 }
680 695
681 class _ReductionKind { 696 class _ReductionKind {
682 final String name; 697 final String name;
683 final int hashCode; 698 final int hashCode;
684 699
685 const _ReductionKind(this.name, this.hashCode); 700 const _ReductionKind(this.name, this.hashCode);
686 701
687 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0); 702 static const _ReductionKind DEAD_VAL = const _ReductionKind('dead-val', 0);
688 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1); 703 static const _ReductionKind DEAD_CONT = const _ReductionKind('dead-cont', 1);
(...skipping 26 matching lines...) Expand all
715 } 730 }
716 731
717 String toString() => "$kind: $node"; 732 String toString() => "$kind: $node";
718 } 733 }
719 734
720 /// A dummy class used solely to mark nodes as deleted once they are removed 735 /// A dummy class used solely to mark nodes as deleted once they are removed
721 /// from a term. 736 /// from a term.
722 class _DeletedNode extends Node { 737 class _DeletedNode extends Node {
723 accept(_) => null; 738 accept(_) => null;
724 } 739 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart ('k') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698