| 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 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 Object* array = READ_FIELD(this, kElementsOffset); | 1332 Object* array = READ_FIELD(this, kElementsOffset); |
| 1333 ASSERT(array->HasValidElements()); | 1333 ASSERT(array->HasValidElements()); |
| 1334 return reinterpret_cast<HeapObject*>(array); | 1334 return reinterpret_cast<HeapObject*>(array); |
| 1335 } | 1335 } |
| 1336 | 1336 |
| 1337 | 1337 |
| 1338 void JSObject::set_elements(HeapObject* value, WriteBarrierMode mode) { | 1338 void JSObject::set_elements(HeapObject* value, WriteBarrierMode mode) { |
| 1339 ASSERT(map()->has_fast_elements() == | 1339 ASSERT(map()->has_fast_elements() == |
| 1340 (value->map() == GetHeap()->fixed_array_map() || | 1340 (value->map() == GetHeap()->fixed_array_map() || |
| 1341 value->map() == GetHeap()->fixed_cow_array_map())); | 1341 value->map() == GetHeap()->fixed_cow_array_map())); |
| 1342 ASSERT(map()->has_fast_double_elements() == |
| 1343 value->IsFixedDoubleArray()); |
| 1342 ASSERT(value->HasValidElements()); | 1344 ASSERT(value->HasValidElements()); |
| 1343 WRITE_FIELD(this, kElementsOffset, value); | 1345 WRITE_FIELD(this, kElementsOffset, value); |
| 1344 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kElementsOffset, mode); | 1346 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kElementsOffset, mode); |
| 1345 } | 1347 } |
| 1346 | 1348 |
| 1347 | 1349 |
| 1348 void JSObject::initialize_properties() { | 1350 void JSObject::initialize_properties() { |
| 1349 ASSERT(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array())); | 1351 ASSERT(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array())); |
| 1350 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array()); | 1352 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array()); |
| 1351 } | 1353 } |
| (...skipping 3189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4541 #undef WRITE_INT_FIELD | 4543 #undef WRITE_INT_FIELD |
| 4542 #undef READ_SHORT_FIELD | 4544 #undef READ_SHORT_FIELD |
| 4543 #undef WRITE_SHORT_FIELD | 4545 #undef WRITE_SHORT_FIELD |
| 4544 #undef READ_BYTE_FIELD | 4546 #undef READ_BYTE_FIELD |
| 4545 #undef WRITE_BYTE_FIELD | 4547 #undef WRITE_BYTE_FIELD |
| 4546 | 4548 |
| 4547 | 4549 |
| 4548 } } // namespace v8::internal | 4550 } } // namespace v8::internal |
| 4549 | 4551 |
| 4550 #endif // V8_OBJECTS_INL_H_ | 4552 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |