OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 6570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6581 } | 6581 } |
6582 | 6582 |
6583 | 6583 |
6584 bool AccessorPair::prohibits_overwriting() { | 6584 bool AccessorPair::prohibits_overwriting() { |
6585 return BooleanBit::get(access_flags(), kProhibitsOverwritingBit); | 6585 return BooleanBit::get(access_flags(), kProhibitsOverwritingBit); |
6586 } | 6586 } |
6587 | 6587 |
6588 | 6588 |
6589 template<typename Derived, typename Shape, typename Key> | 6589 template<typename Derived, typename Shape, typename Key> |
6590 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, | 6590 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, |
6591 Object* key, | 6591 Handle<Object> key, |
6592 Object* value) { | 6592 Handle<Object> value) { |
6593 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); | 6593 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); |
6594 } | 6594 } |
6595 | 6595 |
6596 | 6596 |
6597 template<typename Derived, typename Shape, typename Key> | 6597 template<typename Derived, typename Shape, typename Key> |
6598 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, | 6598 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, |
6599 Object* key, | 6599 Handle<Object> key, |
6600 Object* value, | 6600 Handle<Object> value, |
6601 PropertyDetails details) { | 6601 PropertyDetails details) { |
6602 ASSERT(!key->IsName() || | 6602 ASSERT(!key->IsName() || |
6603 details.IsDeleted() || | 6603 details.IsDeleted() || |
6604 details.dictionary_index() > 0); | 6604 details.dictionary_index() > 0); |
6605 int index = DerivedHashTable::EntryToIndex(entry); | 6605 int index = DerivedHashTable::EntryToIndex(entry); |
6606 DisallowHeapAllocation no_gc; | 6606 DisallowHeapAllocation no_gc; |
6607 WriteBarrierMode mode = FixedArray::GetWriteBarrierMode(no_gc); | 6607 WriteBarrierMode mode = FixedArray::GetWriteBarrierMode(no_gc); |
6608 FixedArray::set(index, key, mode); | 6608 FixedArray::set(index, *key, mode); |
6609 FixedArray::set(index+1, value, mode); | 6609 FixedArray::set(index+1, *value, mode); |
6610 FixedArray::set(index+2, details.AsSmi()); | 6610 FixedArray::set(index+2, details.AsSmi()); |
6611 } | 6611 } |
6612 | 6612 |
6613 | 6613 |
6614 bool NumberDictionaryShape::IsMatch(uint32_t key, Object* other) { | 6614 bool NumberDictionaryShape::IsMatch(uint32_t key, Object* other) { |
6615 ASSERT(other->IsNumber()); | 6615 ASSERT(other->IsNumber()); |
6616 return key == static_cast<uint32_t>(other->Number()); | 6616 return key == static_cast<uint32_t>(other->Number()); |
6617 } | 6617 } |
6618 | 6618 |
6619 | 6619 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6700 } | 6700 } |
6701 | 6701 |
6702 | 6702 |
6703 MaybeObject* ObjectHashTableShape::AsObject(Heap* heap, Object* key) { | 6703 MaybeObject* ObjectHashTableShape::AsObject(Heap* heap, Object* key) { |
6704 return key; | 6704 return key; |
6705 } | 6705 } |
6706 | 6706 |
6707 | 6707 |
6708 Handle<ObjectHashTable> ObjectHashTable::Shrink( | 6708 Handle<ObjectHashTable> ObjectHashTable::Shrink( |
6709 Handle<ObjectHashTable> table, Handle<Object> key) { | 6709 Handle<ObjectHashTable> table, Handle<Object> key) { |
6710 return HashTable_::Shrink(table, *key); | 6710 return DerivedHashTable::Shrink(table, *key); |
6711 } | 6711 } |
6712 | 6712 |
6713 | 6713 |
6714 template <int entrysize> | 6714 template <int entrysize> |
6715 bool WeakHashTableShape<entrysize>::IsMatch(Object* key, Object* other) { | 6715 bool WeakHashTableShape<entrysize>::IsMatch(Object* key, Object* other) { |
6716 return key->SameValue(other); | 6716 return key->SameValue(other); |
6717 } | 6717 } |
6718 | 6718 |
6719 | 6719 |
6720 template <int entrysize> | 6720 template <int entrysize> |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7027 #undef READ_SHORT_FIELD | 7027 #undef READ_SHORT_FIELD |
7028 #undef WRITE_SHORT_FIELD | 7028 #undef WRITE_SHORT_FIELD |
7029 #undef READ_BYTE_FIELD | 7029 #undef READ_BYTE_FIELD |
7030 #undef WRITE_BYTE_FIELD | 7030 #undef WRITE_BYTE_FIELD |
7031 #undef NOBARRIER_READ_BYTE_FIELD | 7031 #undef NOBARRIER_READ_BYTE_FIELD |
7032 #undef NOBARRIER_WRITE_BYTE_FIELD | 7032 #undef NOBARRIER_WRITE_BYTE_FIELD |
7033 | 7033 |
7034 } } // namespace v8::internal | 7034 } } // namespace v8::internal |
7035 | 7035 |
7036 #endif // V8_OBJECTS_INL_H_ | 7036 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |