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

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

Issue 172088: Analyze functions for assignment to this properties (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 4 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 PrintProperties(); 364 PrintProperties();
365 PrintElements(); 365 PrintElements();
366 PrintF(" }\n"); 366 PrintF(" }\n");
367 } 367 }
368 368
369 369
370 void JSObject::JSObjectVerify() { 370 void JSObject::JSObjectVerify() {
371 VerifyHeapPointer(properties()); 371 VerifyHeapPointer(properties());
372 VerifyHeapPointer(elements()); 372 VerifyHeapPointer(elements());
373 if (HasFastProperties()) { 373 if (HasFastProperties()) {
374 CHECK(map()->unused_property_fields() == 374 CHECK_EQ(map()->unused_property_fields(),
375 (map()->inobject_properties() + properties()->length() - 375 (map()->inobject_properties() + properties()->length() -
376 map()->NextFreePropertyIndex())); 376 map()->NextFreePropertyIndex()));
377 } 377 }
378 } 378 }
379 379
380 380
381 static const char* TypeToString(InstanceType type) { 381 static const char* TypeToString(InstanceType type) {
382 switch (type) { 382 switch (type) {
383 case INVALID_TYPE: return "INVALID"; 383 case INVALID_TYPE: return "INVALID";
384 case MAP_TYPE: return "MAP"; 384 case MAP_TYPE: return "MAP";
385 case HEAP_NUMBER_TYPE: return "HEAP_NUMBER"; 385 case HEAP_NUMBER_TYPE: return "HEAP_NUMBER";
386 case SHORT_SYMBOL_TYPE: 386 case SHORT_SYMBOL_TYPE:
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 #undef MAKE_STRUCT_CASE 455 #undef MAKE_STRUCT_CASE
456 } 456 }
457 return "UNKNOWN"; 457 return "UNKNOWN";
458 } 458 }
459 459
460 460
461 void Map::MapPrint() { 461 void Map::MapPrint() {
462 HeapObject::PrintHeader("Map"); 462 HeapObject::PrintHeader("Map");
463 PrintF(" - type: %s\n", TypeToString(instance_type())); 463 PrintF(" - type: %s\n", TypeToString(instance_type()));
464 PrintF(" - instance size: %d\n", instance_size()); 464 PrintF(" - instance size: %d\n", instance_size());
465 PrintF(" - inobject properties: %d\n", inobject_properties());
465 PrintF(" - unused property fields: %d\n", unused_property_fields()); 466 PrintF(" - unused property fields: %d\n", unused_property_fields());
466 if (is_hidden_prototype()) { 467 if (is_hidden_prototype()) {
467 PrintF(" - hidden_prototype\n"); 468 PrintF(" - hidden_prototype\n");
468 } 469 }
469 if (has_named_interceptor()) { 470 if (has_named_interceptor()) {
470 PrintF(" - named_interceptor\n"); 471 PrintF(" - named_interceptor\n");
471 } 472 }
472 if (has_indexed_interceptor()) { 473 if (has_indexed_interceptor()) {
473 PrintF(" - indexed_interceptor\n"); 474 PrintF(" - indexed_interceptor\n");
474 } 475 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 // Script files are often large, hard to read. 613 // Script files are often large, hard to read.
613 // PrintF("\n - script ="); 614 // PrintF("\n - script =");
614 // script()->Print(); 615 // script()->Print();
615 PrintF("\n - function token position = %d", function_token_position()); 616 PrintF("\n - function token position = %d", function_token_position());
616 PrintF("\n - start position = %d", start_position()); 617 PrintF("\n - start position = %d", start_position());
617 PrintF("\n - end position = %d", end_position()); 618 PrintF("\n - end position = %d", end_position());
618 PrintF("\n - is expression = %d", is_expression()); 619 PrintF("\n - is expression = %d", is_expression());
619 PrintF("\n - debug info = "); 620 PrintF("\n - debug info = ");
620 debug_info()->ShortPrint(); 621 debug_info()->ShortPrint();
621 PrintF("\n - length = %d", length()); 622 PrintF("\n - length = %d", length());
623 PrintF("\n - has_only_this_property_assignments = %d",
624 has_only_this_property_assignments());
625 PrintF("\n - has_only_simple_this_property_assignments = %d",
626 has_only_simple_this_property_assignments());
627 PrintF("\n - this_property_assignments = ");
628 this_property_assignments()->ShortPrint();
622 PrintF("\n"); 629 PrintF("\n");
623 } 630 }
624 631
625 void SharedFunctionInfo::SharedFunctionInfoVerify() { 632 void SharedFunctionInfo::SharedFunctionInfoVerify() {
626 CHECK(IsSharedFunctionInfo()); 633 CHECK(IsSharedFunctionInfo());
627 VerifyObjectField(kNameOffset); 634 VerifyObjectField(kNameOffset);
628 VerifyObjectField(kCodeOffset); 635 VerifyObjectField(kCodeOffset);
629 VerifyObjectField(kInstanceClassNameOffset); 636 VerifyObjectField(kInstanceClassNameOffset);
630 VerifyObjectField(kExternalReferenceDataOffset); 637 VerifyObjectField(kExternalReferenceDataOffset);
631 VerifyObjectField(kScriptOffset); 638 VerifyObjectField(kScriptOffset);
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 } 1153 }
1147 current = hash; 1154 current = hash;
1148 } 1155 }
1149 return true; 1156 return true;
1150 } 1157 }
1151 1158
1152 1159
1153 #endif // DEBUG 1160 #endif // DEBUG
1154 1161
1155 } } // namespace v8::internal 1162 } } // 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