| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/disasm.h" | 8 #include "src/disasm.h" |
| 9 #include "src/disassembler.h" | 9 #include "src/disassembler.h" |
| 10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 break; | 69 break; |
| 70 case FIXED_DOUBLE_ARRAY_TYPE: | 70 case FIXED_DOUBLE_ARRAY_TYPE: |
| 71 FixedDoubleArray::cast(this)->FixedDoubleArrayVerify(); | 71 FixedDoubleArray::cast(this)->FixedDoubleArrayVerify(); |
| 72 break; | 72 break; |
| 73 case BYTE_ARRAY_TYPE: | 73 case BYTE_ARRAY_TYPE: |
| 74 ByteArray::cast(this)->ByteArrayVerify(); | 74 ByteArray::cast(this)->ByteArrayVerify(); |
| 75 break; | 75 break; |
| 76 case BYTECODE_ARRAY_TYPE: | 76 case BYTECODE_ARRAY_TYPE: |
| 77 BytecodeArray::cast(this)->BytecodeArrayVerify(); | 77 BytecodeArray::cast(this)->BytecodeArrayVerify(); |
| 78 break; | 78 break; |
| 79 case TRANSITION_ARRAY_TYPE: | |
| 80 TransitionArray::cast(this)->TransitionArrayVerify(); | |
| 81 break; | |
| 82 case FREE_SPACE_TYPE: | 79 case FREE_SPACE_TYPE: |
| 83 FreeSpace::cast(this)->FreeSpaceVerify(); | 80 FreeSpace::cast(this)->FreeSpaceVerify(); |
| 84 break; | 81 break; |
| 85 | 82 |
| 86 #define VERIFY_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ | 83 #define VERIFY_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ |
| 87 case FIXED_##TYPE##_ARRAY_TYPE: \ | 84 case FIXED_##TYPE##_ARRAY_TYPE: \ |
| 88 Fixed##Type##Array::cast(this)->FixedTypedArrayVerify(); \ | 85 Fixed##Type##Array::cast(this)->FixedTypedArrayVerify(); \ |
| 89 break; | 86 break; |
| 90 | 87 |
| 91 TYPED_ARRAYS(VERIFY_TYPED_ARRAY) | 88 TYPED_ARRAYS(VERIFY_TYPED_ARRAY) |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 V8_UINT64_C(0x7FF8000000000000); | 400 V8_UINT64_C(0x7FF8000000000000); |
| 404 // Create implementation specific sNaN by inverting relevant bit. | 401 // Create implementation specific sNaN by inverting relevant bit. |
| 405 unexpected ^= V8_UINT64_C(0x0008000000000000); | 402 unexpected ^= V8_UINT64_C(0x0008000000000000); |
| 406 CHECK((value & V8_UINT64_C(0x7FF8000000000000)) != unexpected || | 403 CHECK((value & V8_UINT64_C(0x7FF8000000000000)) != unexpected || |
| 407 (value & V8_UINT64_C(0x0007FFFFFFFFFFFF)) == V8_UINT64_C(0)); | 404 (value & V8_UINT64_C(0x0007FFFFFFFFFFFF)) == V8_UINT64_C(0)); |
| 408 } | 405 } |
| 409 } | 406 } |
| 410 } | 407 } |
| 411 | 408 |
| 412 | 409 |
| 413 void TransitionArray::TransitionArrayVerify() { | |
| 414 for (int i = 0; i < length(); i++) { | |
| 415 Object* e = get(i); | |
| 416 VerifyPointer(e); | |
| 417 } | |
| 418 CHECK_LE(LengthFor(number_of_transitions()), length()); | |
| 419 CHECK(next_link()->IsUndefined() || next_link()->IsSmi() || | |
| 420 next_link()->IsTransitionArray()); | |
| 421 } | |
| 422 | |
| 423 | |
| 424 void JSGeneratorObject::JSGeneratorObjectVerify() { | 410 void JSGeneratorObject::JSGeneratorObjectVerify() { |
| 425 // In an expression like "new g()", there can be a point where a generator | 411 // In an expression like "new g()", there can be a point where a generator |
| 426 // object is allocated but its fields are all undefined, as it hasn't yet been | 412 // object is allocated but its fields are all undefined, as it hasn't yet been |
| 427 // initialized by the generator. Hence these weak checks. | 413 // initialized by the generator. Hence these weak checks. |
| 428 VerifyObjectField(kFunctionOffset); | 414 VerifyObjectField(kFunctionOffset); |
| 429 VerifyObjectField(kContextOffset); | 415 VerifyObjectField(kContextOffset); |
| 430 VerifyObjectField(kReceiverOffset); | 416 VerifyObjectField(kReceiverOffset); |
| 431 VerifyObjectField(kOperandStackOffset); | 417 VerifyObjectField(kOperandStackOffset); |
| 432 VerifyObjectField(kContinuationOffset); | 418 VerifyObjectField(kContinuationOffset); |
| 433 } | 419 } |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 | 1308 |
| 1323 // Both are done at the same time. | 1309 // Both are done at the same time. |
| 1324 CHECK_EQ(new_it.done(), old_it.done()); | 1310 CHECK_EQ(new_it.done(), old_it.done()); |
| 1325 } | 1311 } |
| 1326 | 1312 |
| 1327 | 1313 |
| 1328 #endif // DEBUG | 1314 #endif // DEBUG |
| 1329 | 1315 |
| 1330 } // namespace internal | 1316 } // namespace internal |
| 1331 } // namespace v8 | 1317 } // namespace v8 |
| OLD | NEW |