| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 ASSERT(AttributesField::is_valid(attributes)); | 2646 ASSERT(AttributesField::is_valid(attributes)); |
| 2647 int rest_value = flag()->value() & ~AttributesField::mask(); | 2647 int rest_value = flag()->value() & ~AttributesField::mask(); |
| 2648 set_flag(Smi::FromInt(rest_value | AttributesField::encode(attributes))); | 2648 set_flag(Smi::FromInt(rest_value | AttributesField::encode(attributes))); |
| 2649 } | 2649 } |
| 2650 | 2650 |
| 2651 template<typename Shape, typename Key> | 2651 template<typename Shape, typename Key> |
| 2652 void Dictionary<Shape, Key>::SetEntry(int entry, | 2652 void Dictionary<Shape, Key>::SetEntry(int entry, |
| 2653 Object* key, | 2653 Object* key, |
| 2654 Object* value, | 2654 Object* value, |
| 2655 PropertyDetails details) { | 2655 PropertyDetails details) { |
| 2656 ASSERT(!key->IsString() || details.index() > 0); | 2656 ASSERT(!key->IsString() || details.IsDeleted() || details.index() > 0); |
| 2657 int index = HashTable<Shape, Key>::EntryToIndex(entry); | 2657 int index = HashTable<Shape, Key>::EntryToIndex(entry); |
| 2658 WriteBarrierMode mode = FixedArray::GetWriteBarrierMode(); | 2658 WriteBarrierMode mode = FixedArray::GetWriteBarrierMode(); |
| 2659 FixedArray::set(index, key, mode); | 2659 FixedArray::set(index, key, mode); |
| 2660 FixedArray::set(index+1, value, mode); | 2660 FixedArray::set(index+1, value, mode); |
| 2661 FixedArray::fast_set(this, index+2, details.AsSmi()); | 2661 FixedArray::fast_set(this, index+2, details.AsSmi()); |
| 2662 } | 2662 } |
| 2663 | 2663 |
| 2664 | 2664 |
| 2665 void Map::ClearCodeCache() { | 2665 void Map::ClearCodeCache() { |
| 2666 // No write barrier is needed since empty_fixed_array is not in new space. | 2666 // No write barrier is needed since empty_fixed_array is not in new space. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2707 #undef WRITE_INT_FIELD | 2707 #undef WRITE_INT_FIELD |
| 2708 #undef READ_SHORT_FIELD | 2708 #undef READ_SHORT_FIELD |
| 2709 #undef WRITE_SHORT_FIELD | 2709 #undef WRITE_SHORT_FIELD |
| 2710 #undef READ_BYTE_FIELD | 2710 #undef READ_BYTE_FIELD |
| 2711 #undef WRITE_BYTE_FIELD | 2711 #undef WRITE_BYTE_FIELD |
| 2712 | 2712 |
| 2713 | 2713 |
| 2714 } } // namespace v8::internal | 2714 } } // namespace v8::internal |
| 2715 | 2715 |
| 2716 #endif // V8_OBJECTS_INL_H_ | 2716 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |