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 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2635 ASSERT(AttributesField::is_valid(attributes)); | 2635 ASSERT(AttributesField::is_valid(attributes)); |
2636 int rest_value = flag()->value() & ~AttributesField::mask(); | 2636 int rest_value = flag()->value() & ~AttributesField::mask(); |
2637 set_flag(Smi::FromInt(rest_value | AttributesField::encode(attributes))); | 2637 set_flag(Smi::FromInt(rest_value | AttributesField::encode(attributes))); |
2638 } | 2638 } |
2639 | 2639 |
2640 template<typename Shape, typename Key> | 2640 template<typename Shape, typename Key> |
2641 void Dictionary<Shape, Key>::SetEntry(int entry, | 2641 void Dictionary<Shape, Key>::SetEntry(int entry, |
2642 Object* key, | 2642 Object* key, |
2643 Object* value, | 2643 Object* value, |
2644 PropertyDetails details) { | 2644 PropertyDetails details) { |
2645 ASSERT(!Shape::kIsEnumerable || details.index() > 0); | 2645 ASSERT(!key->IsString() || details.index() > 0); |
2646 int index = HashTable<Shape, Key>::EntryToIndex(entry); | 2646 int index = HashTable<Shape, Key>::EntryToIndex(entry); |
2647 WriteBarrierMode mode = FixedArray::GetWriteBarrierMode(); | 2647 WriteBarrierMode mode = FixedArray::GetWriteBarrierMode(); |
2648 FixedArray::set(index, key, mode); | 2648 FixedArray::set(index, key, mode); |
2649 FixedArray::set(index+1, value, mode); | 2649 FixedArray::set(index+1, value, mode); |
2650 FixedArray::fast_set(this, index+2, details.AsSmi()); | 2650 FixedArray::fast_set(this, index+2, details.AsSmi()); |
2651 } | 2651 } |
2652 | 2652 |
2653 | 2653 |
2654 void Map::ClearCodeCache() { | 2654 void Map::ClearCodeCache() { |
2655 // No write barrier is needed since empty_fixed_array is not in new space. | 2655 // 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... |
2696 #undef WRITE_INT_FIELD | 2696 #undef WRITE_INT_FIELD |
2697 #undef READ_SHORT_FIELD | 2697 #undef READ_SHORT_FIELD |
2698 #undef WRITE_SHORT_FIELD | 2698 #undef WRITE_SHORT_FIELD |
2699 #undef READ_BYTE_FIELD | 2699 #undef READ_BYTE_FIELD |
2700 #undef WRITE_BYTE_FIELD | 2700 #undef WRITE_BYTE_FIELD |
2701 | 2701 |
2702 | 2702 |
2703 } } // namespace v8::internal | 2703 } } // namespace v8::internal |
2704 | 2704 |
2705 #endif // V8_OBJECTS_INL_H_ | 2705 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |