| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 | 250 |
| 251 | 251 |
| 252 void JSObject::JSObjectVerify() { | 252 void JSObject::JSObjectVerify() { |
| 253 VerifyHeapPointer(properties()); | 253 VerifyHeapPointer(properties()); |
| 254 VerifyHeapPointer(elements()); | 254 VerifyHeapPointer(elements()); |
| 255 if (HasFastProperties()) { | 255 if (HasFastProperties()) { |
| 256 CHECK_EQ(map()->unused_property_fields(), | 256 CHECK_EQ(map()->unused_property_fields(), |
| 257 (map()->inobject_properties() + properties()->length() - | 257 (map()->inobject_properties() + properties()->length() - |
| 258 map()->NextFreePropertyIndex())); | 258 map()->NextFreePropertyIndex())); |
| 259 } | 259 } |
| 260 ASSERT_EQ(map()->has_fast_elements(), | 260 ASSERT_EQ((map()->has_fast_elements() || map()->has_fast_smi_only_elements()), |
| 261 (elements()->map() == GetHeap()->fixed_array_map() || | 261 (elements()->map() == GetHeap()->fixed_array_map() || |
| 262 elements()->map() == GetHeap()->fixed_cow_array_map())); | 262 elements()->map() == GetHeap()->fixed_cow_array_map())); |
| 263 ASSERT(map()->has_fast_elements() == HasFastElements()); | 263 ASSERT(map()->has_fast_elements() == HasFastElements()); |
| 264 } | 264 } |
| 265 | 265 |
| 266 | 266 |
| 267 void Map::MapVerify() { | 267 void Map::MapVerify() { |
| 268 ASSERT(!HEAP->InNewSpace(this)); | 268 ASSERT(!HEAP->InNewSpace(this)); |
| 269 ASSERT(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE); | 269 ASSERT(FIRST_TYPE <= instance_type() && instance_type() <= LAST_TYPE); |
| 270 ASSERT(instance_size() == kVariableSizeSentinel || | 270 ASSERT(instance_size() == kVariableSizeSentinel || |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 } | 312 } |
| 313 } | 313 } |
| 314 | 314 |
| 315 | 315 |
| 316 void FixedDoubleArray::FixedDoubleArrayVerify() { | 316 void FixedDoubleArray::FixedDoubleArrayVerify() { |
| 317 for (int i = 0; i < length(); i++) { | 317 for (int i = 0; i < length(); i++) { |
| 318 if (!is_the_hole(i)) { | 318 if (!is_the_hole(i)) { |
| 319 double value = get_scalar(i); | 319 double value = get_scalar(i); |
| 320 ASSERT(!isnan(value) || | 320 ASSERT(!isnan(value) || |
| 321 (BitCast<uint64_t>(value) == | 321 (BitCast<uint64_t>(value) == |
| 322 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double()))); | 322 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || |
| 323 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); |
| 323 } | 324 } |
| 324 } | 325 } |
| 325 } | 326 } |
| 326 | 327 |
| 327 | 328 |
| 328 void JSValue::JSValueVerify() { | 329 void JSValue::JSValueVerify() { |
| 329 Object* v = value(); | 330 Object* v = value(); |
| 330 if (v->IsHeapObject()) { | 331 if (v->IsHeapObject()) { |
| 331 VerifyHeapPointer(v); | 332 VerifyHeapPointer(v); |
| 332 } | 333 } |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 ASSERT(e->IsUndefined()); | 797 ASSERT(e->IsUndefined()); |
| 797 } | 798 } |
| 798 } | 799 } |
| 799 } | 800 } |
| 800 } | 801 } |
| 801 | 802 |
| 802 | 803 |
| 803 #endif // DEBUG | 804 #endif // DEBUG |
| 804 | 805 |
| 805 } } // namespace v8::internal | 806 } } // namespace v8::internal |
| OLD | NEW |