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

Side by Side Diff: runtime/vm/il_printer.cc

Issue 744853003: Integrate the Irregexp Regular Expression Engine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix clang and win build Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/growable_array.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "vm/il_printer.h" 5 #include "vm/il_printer.h"
6 6
7 #include "vm/flow_graph_range_analysis.h" 7 #include "vm/flow_graph_range_analysis.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/parser.h" 10 #include "vm/parser.h"
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 } 921 }
922 f->Print("\n}"); 922 f->Print("\n}");
923 } 923 }
924 if (HasParallelMove()) { 924 if (HasParallelMove()) {
925 f->Print(" "); 925 f->Print(" ");
926 parallel_move()->PrintTo(f); 926 parallel_move()->PrintTo(f);
927 } 927 }
928 } 928 }
929 929
930 930
931 void IndirectEntryInstr::PrintTo(BufferFormatter* f) const {
932 ASSERT(try_index() == CatchClauseNode::kInvalidTryIndex);
933 f->Print("B%" Pd "[join indirect]:%" Pd " pred(", block_id(), GetDeoptId());
934 for (intptr_t i = 0; i < predecessors_.length(); ++i) {
935 if (i > 0) f->Print(", ");
936 f->Print("B%" Pd, predecessors_[i]->block_id());
937 }
938 f->Print(")");
939 if (phis_ != NULL) {
940 f->Print(" {");
941 for (intptr_t i = 0; i < phis_->length(); ++i) {
942 if ((*phis_)[i] == NULL) continue;
943 f->Print("\n ");
944 (*phis_)[i]->PrintTo(f);
945 }
946 f->Print("\n}");
947 }
948 if (HasParallelMove()) {
949 f->Print(" ");
950 parallel_move()->PrintTo(f);
951 }
952 }
953
954
931 static const char *RepresentationToCString(Representation rep) { 955 static const char *RepresentationToCString(Representation rep) {
932 switch (rep) { 956 switch (rep) {
933 case kTagged: 957 case kTagged:
934 return "tagged"; 958 return "tagged";
935 case kUntagged: 959 case kUntagged:
936 return "untagged"; 960 return "untagged";
937 case kUnboxedDouble: 961 case kUnboxedDouble:
938 return "double"; 962 return "double";
939 case kUnboxedInt32: 963 case kUnboxedInt32:
940 return "int32"; 964 return "int32";
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 f->Print(" "); 1087 f->Print(" ");
1064 } 1088 }
1065 if (GetDeoptId() != Isolate::kNoDeoptId) { 1089 if (GetDeoptId() != Isolate::kNoDeoptId) {
1066 f->Print("goto:%" Pd " %" Pd "", GetDeoptId(), successor()->block_id()); 1090 f->Print("goto:%" Pd " %" Pd "", GetDeoptId(), successor()->block_id());
1067 } else { 1091 } else {
1068 f->Print("goto: %" Pd "", successor()->block_id()); 1092 f->Print("goto: %" Pd "", successor()->block_id());
1069 } 1093 }
1070 } 1094 }
1071 1095
1072 1096
1097 void IndirectGotoInstr::PrintTo(BufferFormatter* f) const {
1098 if (GetDeoptId() != Isolate::kNoDeoptId) {
1099 f->Print("igoto:%" Pd "(", GetDeoptId());
1100 } else {
1101 f->Print("igoto:(");
1102 }
1103 InputAt(0)->PrintTo(f);
1104 f->Print(")");
1105 }
1106
1107
1073 void BranchInstr::PrintTo(BufferFormatter* f) const { 1108 void BranchInstr::PrintTo(BufferFormatter* f) const {
1074 f->Print("%s ", DebugName()); 1109 f->Print("%s ", DebugName());
1075 f->Print("if "); 1110 f->Print("if ");
1076 comparison()->PrintTo(f); 1111 comparison()->PrintTo(f);
1077 1112
1078 f->Print(" goto (%" Pd ", %" Pd ")", 1113 f->Print(" goto (%" Pd ", %" Pd ")",
1079 true_successor()->block_id(), 1114 true_successor()->block_id(),
1080 false_successor()->block_id()); 1115 false_successor()->block_id());
1081 } 1116 }
1082 1117
(...skipping 30 matching lines...) Expand all
1113 } 1148 }
1114 1149
1115 const char* Environment::ToCString() const { 1150 const char* Environment::ToCString() const {
1116 char buffer[1024]; 1151 char buffer[1024];
1117 BufferFormatter bf(buffer, 1024); 1152 BufferFormatter bf(buffer, 1024);
1118 PrintTo(&bf); 1153 PrintTo(&bf);
1119 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); 1154 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer);
1120 } 1155 }
1121 1156
1122 } // namespace dart 1157 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/growable_array.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698