OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 261 |
262 | 262 |
263 void JSObject::JSObjectVerify() { | 263 void JSObject::JSObjectVerify() { |
264 VerifyHeapPointer(properties()); | 264 VerifyHeapPointer(properties()); |
265 VerifyHeapPointer(elements()); | 265 VerifyHeapPointer(elements()); |
266 if (HasFastProperties()) { | 266 if (HasFastProperties()) { |
267 CHECK_EQ(map()->unused_property_fields(), | 267 CHECK_EQ(map()->unused_property_fields(), |
268 (map()->inobject_properties() + properties()->length() - | 268 (map()->inobject_properties() + properties()->length() - |
269 map()->NextFreePropertyIndex())); | 269 map()->NextFreePropertyIndex())); |
270 } | 270 } |
271 ASSERT_EQ(map()->has_fast_elements(), | 271 ASSERT_EQ((map()->has_fast_elements() || map()->has_fast_smi_only_elements()), |
272 (elements()->map() == GetHeap()->fixed_array_map() || | 272 (elements()->map() == GetHeap()->fixed_array_map() || |
273 elements()->map() == GetHeap()->fixed_cow_array_map())); | 273 elements()->map() == GetHeap()->fixed_cow_array_map())); |
274 ASSERT(map()->has_fast_elements() == HasFastElements()); | 274 ASSERT(map()->has_fast_elements() == HasFastElements()); |
275 } | 275 } |
276 | 276 |
277 | 277 |
278 void Map::MapVerify() { | 278 void Map::MapVerify() { |
279 ASSERT(!HEAP->InNewSpace(this)); | 279 ASSERT(!HEAP->InNewSpace(this)); |
280 ASSERT(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE); | 280 ASSERT(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE); |
281 ASSERT(instance_size() == kVariableSizeSentinel || | 281 ASSERT(instance_size() == kVariableSizeSentinel || |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 } | 323 } |
324 } | 324 } |
325 | 325 |
326 | 326 |
327 void FixedDoubleArray::FixedDoubleArrayVerify() { | 327 void FixedDoubleArray::FixedDoubleArrayVerify() { |
328 for (int i = 0; i < length(); i++) { | 328 for (int i = 0; i < length(); i++) { |
329 if (!is_the_hole(i)) { | 329 if (!is_the_hole(i)) { |
330 double value = get_scalar(i); | 330 double value = get_scalar(i); |
331 ASSERT(!isnan(value) || | 331 ASSERT(!isnan(value) || |
332 (BitCast<uint64_t>(value) == | 332 (BitCast<uint64_t>(value) == |
333 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double()))); | 333 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || |
| 334 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); |
334 } | 335 } |
335 } | 336 } |
336 } | 337 } |
337 | 338 |
338 | 339 |
339 void JSValue::JSValueVerify() { | 340 void JSValue::JSValueVerify() { |
340 Object* v = value(); | 341 Object* v = value(); |
341 if (v->IsHeapObject()) { | 342 if (v->IsHeapObject()) { |
342 VerifyHeapPointer(v); | 343 VerifyHeapPointer(v); |
343 } | 344 } |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 ASSERT(e->IsUndefined()); | 819 ASSERT(e->IsUndefined()); |
819 } | 820 } |
820 } | 821 } |
821 } | 822 } |
822 } | 823 } |
823 | 824 |
824 | 825 |
825 #endif // DEBUG | 826 #endif // DEBUG |
826 | 827 |
827 } } // namespace v8::internal | 828 } } // namespace v8::internal |
OLD | NEW |