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

Side by Side Diff: src/objects-printer.cc

Issue 10444055: Promoting elements transitions to their own field. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: full patch Created 8 years, 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 PrintF(out, " (field at offset %d)\n", index); 265 PrintF(out, " (field at offset %d)\n", index);
266 break; 266 break;
267 } 267 }
268 case CONSTANT_FUNCTION: 268 case CONSTANT_FUNCTION:
269 descs->GetConstantFunction(i)->ShortPrint(out); 269 descs->GetConstantFunction(i)->ShortPrint(out);
270 PrintF(out, " (constant function)\n"); 270 PrintF(out, " (constant function)\n");
271 break; 271 break;
272 case CALLBACKS: 272 case CALLBACKS:
273 descs->GetCallbacksObject(i)->ShortPrint(out); 273 descs->GetCallbacksObject(i)->ShortPrint(out);
274 PrintF(out, " (callback)\n"); 274 PrintF(out, " (callback)\n");
275 break; 275 break;
danno 2012/06/01 13:49:55 Please add a printer for the transition map in the
Toon Verwaest 2012/06/04 09:17:48 Done.
276 case ELEMENTS_TRANSITION: {
277 PrintF(out, "(elements transition to ");
278 Object* descriptor_contents = descs->GetValue(i);
279 if (descriptor_contents->IsMap()) {
280 Map* map = Map::cast(descriptor_contents);
281 PrintElementsKind(out, map->elements_kind());
282 } else {
283 FixedArray* map_array = FixedArray::cast(descriptor_contents);
284 for (int i = 0; i < map_array->length(); ++i) {
285 Map* map = Map::cast(map_array->get(i));
286 if (i != 0) {
287 PrintF(out, ", ");
288 }
289 PrintElementsKind(out, map->elements_kind());
290 }
291 }
292 PrintF(out, ")\n");
293 break;
294 }
295 case MAP_TRANSITION: 276 case MAP_TRANSITION:
296 PrintF(out, "(map transition)\n"); 277 PrintF(out, "(map transition)\n");
297 break; 278 break;
298 case CONSTANT_TRANSITION: 279 case CONSTANT_TRANSITION:
299 PrintF(out, "(constant transition)\n"); 280 PrintF(out, "(constant transition)\n");
300 break; 281 break;
301 case NULL_DESCRIPTOR: 282 case NULL_DESCRIPTOR:
302 PrintF(out, "(null descriptor)\n"); 283 PrintF(out, "(null descriptor)\n");
303 break; 284 break;
304 case NORMAL: // only in slow mode 285 case NORMAL: // only in slow mode
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 desc.Print(out); 1014 desc.Print(out);
1034 } 1015 }
1035 PrintF(out, "\n"); 1016 PrintF(out, "\n");
1036 } 1017 }
1037 1018
1038 1019
1039 #endif // OBJECT_PRINT 1020 #endif // OBJECT_PRINT
1040 1021
1041 1022
1042 } } // namespace v8::internal 1023 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698