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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 // This could actually happen in the middle of StoreTransitionStub | 332 // This could actually happen in the middle of StoreTransitionStub |
333 // when the new extended backing store is already set into the object and | 333 // when the new extended backing store is already set into the object and |
334 // the allocation of the MutableHeapNumber triggers GC (in this case map | 334 // the allocation of the MutableHeapNumber triggers GC (in this case map |
335 // is not updated yet). | 335 // is not updated yet). |
336 CHECK_EQ(map()->unused_property_fields(), | 336 CHECK_EQ(map()->unused_property_fields(), |
337 actual_unused_property_fields - JSObject::kFieldsAdded); | 337 actual_unused_property_fields - JSObject::kFieldsAdded); |
338 } | 338 } |
339 DescriptorArray* descriptors = map()->instance_descriptors(); | 339 DescriptorArray* descriptors = map()->instance_descriptors(); |
340 Isolate* isolate = GetIsolate(); | 340 Isolate* isolate = GetIsolate(); |
341 for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) { | 341 for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) { |
342 if (descriptors->GetDetails(i).type() == DATA) { | 342 PropertyDetails details = descriptors->GetDetails(i); |
| 343 if (details.location() == kField) { |
| 344 DCHECK_EQ(kData, details.kind()); |
343 Representation r = descriptors->GetDetails(i).representation(); | 345 Representation r = descriptors->GetDetails(i).representation(); |
344 FieldIndex index = FieldIndex::ForDescriptor(map(), i); | 346 FieldIndex index = FieldIndex::ForDescriptor(map(), i); |
345 if (IsUnboxedDoubleField(index)) { | 347 if (IsUnboxedDoubleField(index)) { |
346 DCHECK(r.IsDouble()); | 348 DCHECK(r.IsDouble()); |
347 continue; | 349 continue; |
348 } | 350 } |
349 Object* value = RawFastPropertyAt(index); | 351 Object* value = RawFastPropertyAt(index); |
350 if (r.IsDouble()) DCHECK(value->IsMutableHeapNumber()); | 352 if (r.IsDouble()) DCHECK(value->IsMutableHeapNumber()); |
351 if (value->IsUninitialized(isolate)) continue; | 353 if (value->IsUninitialized(isolate)) continue; |
352 if (r.IsSmi()) DCHECK(value->IsSmi()); | 354 if (r.IsSmi()) DCHECK(value->IsSmi()); |
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1562 | 1564 |
1563 // Both are done at the same time. | 1565 // Both are done at the same time. |
1564 CHECK_EQ(new_it.done(), old_it.done()); | 1566 CHECK_EQ(new_it.done(), old_it.done()); |
1565 } | 1567 } |
1566 | 1568 |
1567 | 1569 |
1568 #endif // DEBUG | 1570 #endif // DEBUG |
1569 | 1571 |
1570 } // namespace internal | 1572 } // namespace internal |
1571 } // namespace v8 | 1573 } // namespace v8 |
OLD | NEW |