| 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/field-type.h" | 10 #include "src/field-type.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 case SYMBOL_TYPE: | 57 case SYMBOL_TYPE: |
| 58 Symbol::cast(this)->SymbolVerify(); | 58 Symbol::cast(this)->SymbolVerify(); |
| 59 break; | 59 break; |
| 60 case MAP_TYPE: | 60 case MAP_TYPE: |
| 61 Map::cast(this)->MapVerify(); | 61 Map::cast(this)->MapVerify(); |
| 62 break; | 62 break; |
| 63 case HEAP_NUMBER_TYPE: | 63 case HEAP_NUMBER_TYPE: |
| 64 case MUTABLE_HEAP_NUMBER_TYPE: | 64 case MUTABLE_HEAP_NUMBER_TYPE: |
| 65 HeapNumber::cast(this)->HeapNumberVerify(); | 65 HeapNumber::cast(this)->HeapNumberVerify(); |
| 66 break; | 66 break; |
| 67 case SIMD128_VALUE_TYPE: | |
| 68 Simd128Value::cast(this)->Simd128ValueVerify(); | |
| 69 break; | |
| 70 case FIXED_ARRAY_TYPE: | 67 case FIXED_ARRAY_TYPE: |
| 71 FixedArray::cast(this)->FixedArrayVerify(); | 68 FixedArray::cast(this)->FixedArrayVerify(); |
| 72 break; | 69 break; |
| 73 case FIXED_DOUBLE_ARRAY_TYPE: | 70 case FIXED_DOUBLE_ARRAY_TYPE: |
| 74 FixedDoubleArray::cast(this)->FixedDoubleArrayVerify(); | 71 FixedDoubleArray::cast(this)->FixedDoubleArrayVerify(); |
| 75 break; | 72 break; |
| 76 case BYTE_ARRAY_TYPE: | 73 case BYTE_ARRAY_TYPE: |
| 77 ByteArray::cast(this)->ByteArrayVerify(); | 74 ByteArray::cast(this)->ByteArrayVerify(); |
| 78 break; | 75 break; |
| 79 case BYTECODE_ARRAY_TYPE: | 76 case BYTECODE_ARRAY_TYPE: |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 CHECK(HasHashCode()); | 259 CHECK(HasHashCode()); |
| 263 CHECK(Hash() > 0u); | 260 CHECK(Hash() > 0u); |
| 264 CHECK(name()->IsUndefined(GetIsolate()) || name()->IsString()); | 261 CHECK(name()->IsUndefined(GetIsolate()) || name()->IsString()); |
| 265 } | 262 } |
| 266 | 263 |
| 267 | 264 |
| 268 void HeapNumber::HeapNumberVerify() { | 265 void HeapNumber::HeapNumberVerify() { |
| 269 CHECK(IsHeapNumber() || IsMutableHeapNumber()); | 266 CHECK(IsHeapNumber() || IsMutableHeapNumber()); |
| 270 } | 267 } |
| 271 | 268 |
| 272 | |
| 273 void Simd128Value::Simd128ValueVerify() { CHECK(IsSimd128Value()); } | |
| 274 | |
| 275 | |
| 276 void ByteArray::ByteArrayVerify() { | 269 void ByteArray::ByteArrayVerify() { |
| 277 CHECK(IsByteArray()); | 270 CHECK(IsByteArray()); |
| 278 } | 271 } |
| 279 | 272 |
| 280 | 273 |
| 281 void BytecodeArray::BytecodeArrayVerify() { | 274 void BytecodeArray::BytecodeArrayVerify() { |
| 282 // TODO(oth): Walk bytecodes and immediate values to validate sanity. | 275 // TODO(oth): Walk bytecodes and immediate values to validate sanity. |
| 283 // - All bytecodes are known and well formed. | 276 // - All bytecodes are known and well formed. |
| 284 // - Jumps must go to new instructions starts. | 277 // - Jumps must go to new instructions starts. |
| 285 // - No Illegal bytecodes. | 278 // - No Illegal bytecodes. |
| (...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 | 1555 |
| 1563 // Both are done at the same time. | 1556 // Both are done at the same time. |
| 1564 CHECK_EQ(new_it.done(), old_it.done()); | 1557 CHECK_EQ(new_it.done(), old_it.done()); |
| 1565 } | 1558 } |
| 1566 | 1559 |
| 1567 | 1560 |
| 1568 #endif // DEBUG | 1561 #endif // DEBUG |
| 1569 | 1562 |
| 1570 } // namespace internal | 1563 } // namespace internal |
| 1571 } // namespace v8 | 1564 } // namespace v8 |
| OLD | NEW |