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

Side by Side Diff: src/hydrogen.h

Issue 7008011: First step in refactoring hydrogen control instructions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | src/hydrogen-instructions.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 void PrintLongProperty(const char* name, int64_t value) { 1167 void PrintLongProperty(const char* name, int64_t value) {
1168 PrintIndent(); 1168 PrintIndent();
1169 trace_.Add("%s %d000\n", name, static_cast<int>(value / 1000)); 1169 trace_.Add("%s %d000\n", name, static_cast<int>(value / 1000));
1170 } 1170 }
1171 1171
1172 void PrintBlockProperty(const char* name, int block_id) { 1172 void PrintBlockProperty(const char* name, int block_id) {
1173 PrintIndent(); 1173 PrintIndent();
1174 trace_.Add("%s \"B%d\"\n", name, block_id); 1174 trace_.Add("%s \"B%d\"\n", name, block_id);
1175 } 1175 }
1176 1176
1177 void PrintBlockProperty(const char* name, int block_id1, int block_id2) {
1178 PrintIndent();
1179 trace_.Add("%s \"B%d\" \"B%d\"\n", name, block_id1, block_id2);
1180 }
1181
1182 void PrintIntProperty(const char* name, int value) { 1177 void PrintIntProperty(const char* name, int value) {
1183 PrintIndent(); 1178 PrintIndent();
1184 trace_.Add("%s %d\n", name, value); 1179 trace_.Add("%s %d\n", name, value);
1185 } 1180 }
1186 1181
1187 void PrintIndent() { 1182 void PrintIndent() {
1188 for (int i = 0; i < indent_; i++) { 1183 for (int i = 0; i < indent_; i++) {
1189 trace_.Add(" "); 1184 trace_.Add(" ");
1190 } 1185 }
1191 } 1186 }
1192 1187
1193 const char* filename_; 1188 const char* filename_;
1194 HeapStringAllocator string_allocator_; 1189 HeapStringAllocator string_allocator_;
1195 StringStream trace_; 1190 StringStream trace_;
1196 int indent_; 1191 int indent_;
1197 }; 1192 };
1198 1193
1199 1194
1200 } } // namespace v8::internal 1195 } } // namespace v8::internal
1201 1196
1202 #endif // V8_HYDROGEN_H_ 1197 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698