| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/disasm.h" | 7 #include "src/disasm.h" |
| 8 #include "src/disassembler.h" | 8 #include "src/disassembler.h" |
| 9 #include "src/heap/objects-visiting.h" | 9 #include "src/heap/objects-visiting.h" |
| 10 #include "src/jsregexp.h" | 10 #include "src/jsregexp.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 DCHECK(r.IsDouble()); | 283 DCHECK(r.IsDouble()); |
| 284 continue; | 284 continue; |
| 285 } | 285 } |
| 286 Object* value = RawFastPropertyAt(index); | 286 Object* value = RawFastPropertyAt(index); |
| 287 if (r.IsDouble()) DCHECK(value->IsMutableHeapNumber()); | 287 if (r.IsDouble()) DCHECK(value->IsMutableHeapNumber()); |
| 288 if (value->IsUninitialized()) continue; | 288 if (value->IsUninitialized()) continue; |
| 289 if (r.IsSmi()) DCHECK(value->IsSmi()); | 289 if (r.IsSmi()) DCHECK(value->IsSmi()); |
| 290 if (r.IsHeapObject()) DCHECK(value->IsHeapObject()); | 290 if (r.IsHeapObject()) DCHECK(value->IsHeapObject()); |
| 291 HeapType* field_type = descriptors->GetFieldType(i); | 291 HeapType* field_type = descriptors->GetFieldType(i); |
| 292 bool type_is_none = field_type->Is(HeapType::None()); | 292 bool type_is_none = field_type->Is(HeapType::None()); |
| 293 bool type_is_any = field_type->Is(HeapType::Any()); | 293 bool type_is_any = HeapType::Any()->Is(field_type); |
| 294 if (r.IsNone()) { | 294 if (r.IsNone()) { |
| 295 CHECK(type_is_none); | 295 CHECK(type_is_none); |
| 296 } else if (!type_is_any && !(type_is_none && r.IsHeapObject())) { | 296 } else if (!type_is_any && !(type_is_none && r.IsHeapObject())) { |
| 297 CHECK(!field_type->NowStable() || field_type->NowContains(value)); | 297 CHECK(!field_type->NowStable() || field_type->NowContains(value)); |
| 298 } | 298 } |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 } | 301 } |
| 302 | 302 |
| 303 // If a GC was caused while constructing this object, the elements | 303 // If a GC was caused while constructing this object, the elements |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 ? it.rinfo()->target_cell() | 1281 ? it.rinfo()->target_cell() |
| 1282 : it.rinfo()->target_object(); | 1282 : it.rinfo()->target_object(); |
| 1283 CHECK(!CanLeak(target, heap, skip_weak_cell)); | 1283 CHECK(!CanLeak(target, heap, skip_weak_cell)); |
| 1284 } | 1284 } |
| 1285 } | 1285 } |
| 1286 | 1286 |
| 1287 | 1287 |
| 1288 #endif // DEBUG | 1288 #endif // DEBUG |
| 1289 | 1289 |
| 1290 } } // namespace v8::internal | 1290 } } // namespace v8::internal |
| OLD | NEW |