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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 break; | 88 break; |
89 case HEAP_NUMBER_TYPE: | 89 case HEAP_NUMBER_TYPE: |
90 HeapNumber::cast(this)->HeapNumberVerify(); | 90 HeapNumber::cast(this)->HeapNumberVerify(); |
91 break; | 91 break; |
92 case FIXED_ARRAY_TYPE: | 92 case FIXED_ARRAY_TYPE: |
93 FixedArray::cast(this)->FixedArrayVerify(); | 93 FixedArray::cast(this)->FixedArrayVerify(); |
94 break; | 94 break; |
95 case FIXED_DOUBLE_ARRAY_TYPE: | 95 case FIXED_DOUBLE_ARRAY_TYPE: |
96 FixedDoubleArray::cast(this)->FixedDoubleArrayVerify(); | 96 FixedDoubleArray::cast(this)->FixedDoubleArrayVerify(); |
97 break; | 97 break; |
| 98 case CONSTANT_POOL_ARRAY_TYPE: |
| 99 ConstantPoolArray::cast(this)->ConstantPoolArrayVerify(); |
| 100 break; |
98 case BYTE_ARRAY_TYPE: | 101 case BYTE_ARRAY_TYPE: |
99 ByteArray::cast(this)->ByteArrayVerify(); | 102 ByteArray::cast(this)->ByteArrayVerify(); |
100 break; | 103 break; |
101 case FREE_SPACE_TYPE: | 104 case FREE_SPACE_TYPE: |
102 FreeSpace::cast(this)->FreeSpaceVerify(); | 105 FreeSpace::cast(this)->FreeSpaceVerify(); |
103 break; | 106 break; |
104 case EXTERNAL_PIXEL_ARRAY_TYPE: | 107 case EXTERNAL_PIXEL_ARRAY_TYPE: |
105 ExternalPixelArray::cast(this)->ExternalPixelArrayVerify(); | 108 ExternalPixelArray::cast(this)->ExternalPixelArrayVerify(); |
106 break; | 109 break; |
107 case EXTERNAL_BYTE_ARRAY_TYPE: | 110 case EXTERNAL_BYTE_ARRAY_TYPE: |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 double value = get_scalar(i); | 435 double value = get_scalar(i); |
433 CHECK(!std::isnan(value) || | 436 CHECK(!std::isnan(value) || |
434 (BitCast<uint64_t>(value) == | 437 (BitCast<uint64_t>(value) == |
435 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || | 438 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || |
436 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); | 439 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); |
437 } | 440 } |
438 } | 441 } |
439 } | 442 } |
440 | 443 |
441 | 444 |
| 445 void ConstantPoolArray::ConstantPoolArrayVerify() { |
| 446 CHECK(IsConstantPoolArray()); |
| 447 } |
| 448 |
| 449 |
442 void JSGeneratorObject::JSGeneratorObjectVerify() { | 450 void JSGeneratorObject::JSGeneratorObjectVerify() { |
443 // In an expression like "new g()", there can be a point where a generator | 451 // In an expression like "new g()", there can be a point where a generator |
444 // object is allocated but its fields are all undefined, as it hasn't yet been | 452 // object is allocated but its fields are all undefined, as it hasn't yet been |
445 // initialized by the generator. Hence these weak checks. | 453 // initialized by the generator. Hence these weak checks. |
446 VerifyObjectField(kFunctionOffset); | 454 VerifyObjectField(kFunctionOffset); |
447 VerifyObjectField(kContextOffset); | 455 VerifyObjectField(kContextOffset); |
448 VerifyObjectField(kReceiverOffset); | 456 VerifyObjectField(kReceiverOffset); |
449 VerifyObjectField(kOperandStackOffset); | 457 VerifyObjectField(kOperandStackOffset); |
450 VerifyObjectField(kContinuationOffset); | 458 VerifyObjectField(kContinuationOffset); |
451 VerifyObjectField(kStackHandlerIndexOffset); | 459 VerifyObjectField(kStackHandlerIndexOffset); |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1184 for (int i = 0; i < number_of_transitions(); ++i) { | 1192 for (int i = 0; i < number_of_transitions(); ++i) { |
1185 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1193 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1186 } | 1194 } |
1187 return true; | 1195 return true; |
1188 } | 1196 } |
1189 | 1197 |
1190 | 1198 |
1191 #endif // DEBUG | 1199 #endif // DEBUG |
1192 | 1200 |
1193 } } // namespace v8::internal | 1201 } } // namespace v8::internal |
OLD | NEW |