| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 double value = get_scalar(i); | 426 double value = get_scalar(i); |
| 424 CHECK(!std::isnan(value) || | 427 CHECK(!std::isnan(value) || |
| 425 (BitCast<uint64_t>(value) == | 428 (BitCast<uint64_t>(value) == |
| 426 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || | 429 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || |
| 427 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); | 430 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); |
| 428 } | 431 } |
| 429 } | 432 } |
| 430 } | 433 } |
| 431 | 434 |
| 432 | 435 |
| 436 void ConstantPoolArray::ConstantPoolArrayVerify() { |
| 437 CHECK(IsConstantPoolArray()); |
| 438 } |
| 439 |
| 440 |
| 433 void JSGeneratorObject::JSGeneratorObjectVerify() { | 441 void JSGeneratorObject::JSGeneratorObjectVerify() { |
| 434 // In an expression like "new g()", there can be a point where a generator | 442 // In an expression like "new g()", there can be a point where a generator |
| 435 // object is allocated but its fields are all undefined, as it hasn't yet been | 443 // object is allocated but its fields are all undefined, as it hasn't yet been |
| 436 // initialized by the generator. Hence these weak checks. | 444 // initialized by the generator. Hence these weak checks. |
| 437 VerifyObjectField(kFunctionOffset); | 445 VerifyObjectField(kFunctionOffset); |
| 438 VerifyObjectField(kContextOffset); | 446 VerifyObjectField(kContextOffset); |
| 439 VerifyObjectField(kReceiverOffset); | 447 VerifyObjectField(kReceiverOffset); |
| 440 VerifyObjectField(kOperandStackOffset); | 448 VerifyObjectField(kOperandStackOffset); |
| 441 VerifyObjectField(kContinuationOffset); | 449 VerifyObjectField(kContinuationOffset); |
| 442 VerifyObjectField(kStackHandlerIndexOffset); | 450 VerifyObjectField(kStackHandlerIndexOffset); |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 for (int i = 0; i < number_of_transitions(); ++i) { | 1176 for (int i = 0; i < number_of_transitions(); ++i) { |
| 1169 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1177 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
| 1170 } | 1178 } |
| 1171 return true; | 1179 return true; |
| 1172 } | 1180 } |
| 1173 | 1181 |
| 1174 | 1182 |
| 1175 #endif // DEBUG | 1183 #endif // DEBUG |
| 1176 | 1184 |
| 1177 } } // namespace v8::internal | 1185 } } // namespace v8::internal |
| OLD | NEW |