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

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

Issue 293023: Added infrastructure for optimizing new CanvasArray types in WebGL... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 2 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 | « src/objects.cc ('k') | src/objects-inl.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 void ByteArray::ByteArrayPrint() { 267 void ByteArray::ByteArrayPrint() {
268 PrintF("byte array, data starts at %p", GetDataStartAddress()); 268 PrintF("byte array, data starts at %p", GetDataStartAddress());
269 } 269 }
270 270
271 271
272 void PixelArray::PixelArrayPrint() { 272 void PixelArray::PixelArrayPrint() {
273 PrintF("pixel array"); 273 PrintF("pixel array");
274 } 274 }
275 275
276 276
277 void ExternalByteArray::ExternalByteArrayPrint() {
278 PrintF("external byte array");
279 }
280
281
282 void ExternalUnsignedByteArray::ExternalUnsignedByteArrayPrint() {
283 PrintF("external unsigned byte array");
284 }
285
286
287 void ExternalShortArray::ExternalShortArrayPrint() {
288 PrintF("external short array");
289 }
290
291
292 void ExternalUnsignedShortArray::ExternalUnsignedShortArrayPrint() {
293 PrintF("external unsigned short array");
294 }
295
296
297 void ExternalIntArray::ExternalIntArrayPrint() {
298 PrintF("external int array");
299 }
300
301
302 void ExternalUnsignedIntArray::ExternalUnsignedIntArrayPrint() {
303 PrintF("external unsigned int array");
304 }
305
306
307 void ExternalFloatArray::ExternalFloatArrayPrint() {
308 PrintF("external float array");
309 }
310
311
277 void ByteArray::ByteArrayVerify() { 312 void ByteArray::ByteArrayVerify() {
278 ASSERT(IsByteArray()); 313 ASSERT(IsByteArray());
279 } 314 }
280 315
281 316
282 void PixelArray::PixelArrayVerify() { 317 void PixelArray::PixelArrayVerify() {
283 ASSERT(IsPixelArray()); 318 ASSERT(IsPixelArray());
284 } 319 }
285 320
286 321
322 void ExternalByteArray::ExternalByteArrayVerify() {
323 ASSERT(IsExternalByteArray());
324 }
325
326
327 void ExternalUnsignedByteArray::ExternalUnsignedByteArrayVerify() {
328 ASSERT(IsExternalUnsignedByteArray());
329 }
330
331
332 void ExternalShortArray::ExternalShortArrayVerify() {
333 ASSERT(IsExternalShortArray());
334 }
335
336
337 void ExternalUnsignedShortArray::ExternalUnsignedShortArrayVerify() {
338 ASSERT(IsExternalUnsignedShortArray());
339 }
340
341
342 void ExternalIntArray::ExternalIntArrayVerify() {
343 ASSERT(IsExternalIntArray());
344 }
345
346
347 void ExternalUnsignedIntArray::ExternalUnsignedIntArrayVerify() {
348 ASSERT(IsExternalUnsignedIntArray());
349 }
350
351
352 void ExternalFloatArray::ExternalFloatArrayVerify() {
353 ASSERT(IsExternalFloatArray());
354 }
355
356
287 void JSObject::PrintProperties() { 357 void JSObject::PrintProperties() {
288 if (HasFastProperties()) { 358 if (HasFastProperties()) {
289 DescriptorArray* descs = map()->instance_descriptors(); 359 DescriptorArray* descs = map()->instance_descriptors();
290 for (int i = 0; i < descs->number_of_descriptors(); i++) { 360 for (int i = 0; i < descs->number_of_descriptors(); i++) {
291 PrintF(" "); 361 PrintF(" ");
292 descs->GetKey(i)->StringPrint(); 362 descs->GetKey(i)->StringPrint();
293 PrintF(": "); 363 PrintF(": ");
294 switch (descs->GetType(i)) { 364 switch (descs->GetType(i)) {
295 case FIELD: { 365 case FIELD: {
296 int index = descs->GetFieldIndex(i); 366 int index = descs->GetFieldIndex(i);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 408 }
339 break; 409 break;
340 } 410 }
341 case PIXEL_ELEMENTS: { 411 case PIXEL_ELEMENTS: {
342 PixelArray* p = PixelArray::cast(elements()); 412 PixelArray* p = PixelArray::cast(elements());
343 for (int i = 0; i < p->length(); i++) { 413 for (int i = 0; i < p->length(); i++) {
344 PrintF(" %d: %d\n", i, p->get(i)); 414 PrintF(" %d: %d\n", i, p->get(i));
345 } 415 }
346 break; 416 break;
347 } 417 }
418 case EXTERNAL_BYTE_ELEMENTS: {
419 ExternalByteArray* p = ExternalByteArray::cast(elements());
420 for (int i = 0; i < p->length(); i++) {
421 PrintF(" %d: %d\n", i, static_cast<int>(p->get(i)));
422 }
423 break;
424 }
425 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: {
426 ExternalUnsignedByteArray* p =
427 ExternalUnsignedByteArray::cast(elements());
428 for (int i = 0; i < p->length(); i++) {
429 PrintF(" %d: %d\n", i, static_cast<int>(p->get(i)));
430 }
431 break;
432 }
433 case EXTERNAL_SHORT_ELEMENTS: {
434 ExternalShortArray* p = ExternalShortArray::cast(elements());
435 for (int i = 0; i < p->length(); i++) {
436 PrintF(" %d: %d\n", i, static_cast<int>(p->get(i)));
437 }
438 break;
439 }
440 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: {
441 ExternalUnsignedShortArray* p =
442 ExternalUnsignedShortArray::cast(elements());
443 for (int i = 0; i < p->length(); i++) {
444 PrintF(" %d: %d\n", i, static_cast<int>(p->get(i)));
445 }
446 break;
447 }
448 case EXTERNAL_INT_ELEMENTS: {
449 ExternalIntArray* p = ExternalIntArray::cast(elements());
450 for (int i = 0; i < p->length(); i++) {
451 PrintF(" %d: %d\n", i, static_cast<int>(p->get(i)));
452 }
453 break;
454 }
455 case EXTERNAL_UNSIGNED_INT_ELEMENTS: {
456 ExternalUnsignedIntArray* p =
457 ExternalUnsignedIntArray::cast(elements());
458 for (int i = 0; i < p->length(); i++) {
459 PrintF(" %d: %d\n", i, static_cast<int>(p->get(i)));
460 }
461 break;
462 }
463 case EXTERNAL_FLOAT_ELEMENTS: {
464 ExternalFloatArray* p = ExternalFloatArray::cast(elements());
465 for (int i = 0; i < p->length(); i++) {
466 PrintF(" %d: %f\n", i, p->get(i));
467 }
468 break;
469 }
348 case DICTIONARY_ELEMENTS: 470 case DICTIONARY_ELEMENTS:
349 elements()->Print(); 471 elements()->Print();
350 break; 472 break;
351 default: 473 default:
352 UNREACHABLE(); 474 UNREACHABLE();
353 break; 475 break;
354 } 476 }
355 } 477 }
356 478
357 479
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 case LONG_SLICED_ASCII_STRING_TYPE: return "SLICED_STRING"; 548 case LONG_SLICED_ASCII_STRING_TYPE: return "SLICED_STRING";
427 case SHORT_EXTERNAL_ASCII_STRING_TYPE: 549 case SHORT_EXTERNAL_ASCII_STRING_TYPE:
428 case MEDIUM_EXTERNAL_ASCII_STRING_TYPE: 550 case MEDIUM_EXTERNAL_ASCII_STRING_TYPE:
429 case LONG_EXTERNAL_ASCII_STRING_TYPE: 551 case LONG_EXTERNAL_ASCII_STRING_TYPE:
430 case SHORT_EXTERNAL_STRING_TYPE: 552 case SHORT_EXTERNAL_STRING_TYPE:
431 case MEDIUM_EXTERNAL_STRING_TYPE: 553 case MEDIUM_EXTERNAL_STRING_TYPE:
432 case LONG_EXTERNAL_STRING_TYPE: return "EXTERNAL_STRING"; 554 case LONG_EXTERNAL_STRING_TYPE: return "EXTERNAL_STRING";
433 case FIXED_ARRAY_TYPE: return "FIXED_ARRAY"; 555 case FIXED_ARRAY_TYPE: return "FIXED_ARRAY";
434 case BYTE_ARRAY_TYPE: return "BYTE_ARRAY"; 556 case BYTE_ARRAY_TYPE: return "BYTE_ARRAY";
435 case PIXEL_ARRAY_TYPE: return "PIXEL_ARRAY"; 557 case PIXEL_ARRAY_TYPE: return "PIXEL_ARRAY";
558 case EXTERNAL_BYTE_ARRAY_TYPE: return "EXTERNAL_BYTE_ARRAY";
559 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE:
560 return "EXTERNAL_UNSIGNED_BYTE_ARRAY";
561 case EXTERNAL_SHORT_ARRAY_TYPE: return "EXTERNAL_SHORT_ARRAY";
562 case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE:
563 return "EXTERNAL_UNSIGNED_SHORT_ARRAY";
564 case EXTERNAL_INT_ARRAY_TYPE: return "EXTERNAL_INT_ARRAY";
565 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE:
566 return "EXTERNAL_UNSIGNED_INT_ARRAY";
567 case EXTERNAL_FLOAT_ARRAY_TYPE: return "EXTERNAL_FLOAT_ARRAY";
436 case FILLER_TYPE: return "FILLER"; 568 case FILLER_TYPE: return "FILLER";
437 case JS_OBJECT_TYPE: return "JS_OBJECT"; 569 case JS_OBJECT_TYPE: return "JS_OBJECT";
438 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT"; 570 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT";
439 case ODDBALL_TYPE: return "ODDBALL"; 571 case ODDBALL_TYPE: return "ODDBALL";
440 case JS_GLOBAL_PROPERTY_CELL_TYPE: return "JS_GLOBAL_PROPERTY_CELL"; 572 case JS_GLOBAL_PROPERTY_CELL_TYPE: return "JS_GLOBAL_PROPERTY_CELL";
441 case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO"; 573 case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO";
442 case JS_FUNCTION_TYPE: return "JS_FUNCTION"; 574 case JS_FUNCTION_TYPE: return "JS_FUNCTION";
443 case CODE_TYPE: return "CODE"; 575 case CODE_TYPE: return "CODE";
444 case JS_ARRAY_TYPE: return "JS_ARRAY"; 576 case JS_ARRAY_TYPE: return "JS_ARRAY";
445 case JS_REGEXP_TYPE: return "JS_REGEXP"; 577 case JS_REGEXP_TYPE: return "JS_REGEXP";
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 } 1289 }
1158 current = hash; 1290 current = hash;
1159 } 1291 }
1160 return true; 1292 return true;
1161 } 1293 }
1162 1294
1163 1295
1164 #endif // DEBUG 1296 #endif // DEBUG
1165 1297
1166 } } // namespace v8::internal 1298 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698