OLD | NEW |
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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 void JSArray::JSArrayVerify() { | 683 void JSArray::JSArrayVerify() { |
684 JSObjectVerify(); | 684 JSObjectVerify(); |
685 CHECK(length()->IsNumber() || length()->IsUndefined()); | 685 CHECK(length()->IsNumber() || length()->IsUndefined()); |
686 // TODO(hpayer): deal gracefully with partially constructed JSObjects, when | 686 // TODO(hpayer): deal gracefully with partially constructed JSObjects, when |
687 // allocation folding is turned off. | 687 // allocation folding is turned off. |
688 if (reinterpret_cast<Map*>(elements()) != | 688 if (reinterpret_cast<Map*>(elements()) != |
689 GetHeap()->one_pointer_filler_map()) { | 689 GetHeap()->one_pointer_filler_map()) { |
690 CHECK(elements()->IsUndefined() || | 690 CHECK(elements()->IsUndefined() || |
691 elements()->IsFixedArray() || | 691 elements()->IsFixedArray() || |
692 elements()->IsFixedDoubleArray()); | 692 elements()->IsFixedDoubleArray()); |
693 // TODO(mvstanton): to diagnose chromium bug 284577, remove after. | |
694 AllocationMemento* memento = AllocationMemento::FindForJSObject(this); | |
695 if (memento != NULL && memento->IsValid()) { | |
696 memento->AllocationMementoVerify(); | |
697 } | |
698 } | 693 } |
699 } | 694 } |
700 | 695 |
701 | 696 |
702 void JSSet::JSSetVerify() { | 697 void JSSet::JSSetVerify() { |
703 CHECK(IsJSSet()); | 698 CHECK(IsJSSet()); |
704 JSObjectVerify(); | 699 JSObjectVerify(); |
705 VerifyHeapPointer(table()); | 700 VerifyHeapPointer(table()); |
706 CHECK(table()->IsHashTable() || table()->IsUndefined()); | 701 CHECK(table()->IsHashTable() || table()->IsUndefined()); |
707 } | 702 } |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 for (int i = 0; i < number_of_transitions(); ++i) { | 1182 for (int i = 0; i < number_of_transitions(); ++i) { |
1188 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1183 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1189 } | 1184 } |
1190 return true; | 1185 return true; |
1191 } | 1186 } |
1192 | 1187 |
1193 | 1188 |
1194 #endif // DEBUG | 1189 #endif // DEBUG |
1195 | 1190 |
1196 } } // namespace v8::internal | 1191 } } // namespace v8::internal |
OLD | NEW |