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