OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2026 // Returns the value at entry. | 2026 // Returns the value at entry. |
2027 Object* ValueAt(int entry) { return get(EntryToIndex(entry)+1); } | 2027 Object* ValueAt(int entry) { return get(EntryToIndex(entry)+1); } |
2028 | 2028 |
2029 // Set the value for entry. | 2029 // Set the value for entry. |
2030 void ValueAtPut(int entry, Object* value) { | 2030 void ValueAtPut(int entry, Object* value) { |
2031 set(EntryToIndex(entry)+1, value); | 2031 set(EntryToIndex(entry)+1, value); |
2032 } | 2032 } |
2033 | 2033 |
2034 // Returns the property details for the property at entry. | 2034 // Returns the property details for the property at entry. |
2035 PropertyDetails DetailsAt(int entry) { | 2035 PropertyDetails DetailsAt(int entry) { |
| 2036 ASSERT(entry >= 0); // Not found is -1, which is not caught by get(). |
2036 return PropertyDetails(Smi::cast(get(EntryToIndex(entry) + 2))); | 2037 return PropertyDetails(Smi::cast(get(EntryToIndex(entry) + 2))); |
2037 } | 2038 } |
2038 | 2039 |
2039 // Set the details for entry. | 2040 // Set the details for entry. |
2040 void DetailsAtPut(int entry, PropertyDetails value) { | 2041 void DetailsAtPut(int entry, PropertyDetails value) { |
2041 set(EntryToIndex(entry) + 2, value.AsSmi()); | 2042 set(EntryToIndex(entry) + 2, value.AsSmi()); |
2042 } | 2043 } |
2043 | 2044 |
2044 // Remove all entries were key is a number and (from <= key && key < to). | 2045 // Remove all entries were key is a number and (from <= key && key < to). |
2045 void RemoveNumberEntries(uint32_t from, uint32_t to); | 2046 void RemoveNumberEntries(uint32_t from, uint32_t to); |
(...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4452 } else { | 4453 } else { |
4453 value &= ~(1 << bit_position); | 4454 value &= ~(1 << bit_position); |
4454 } | 4455 } |
4455 return value; | 4456 return value; |
4456 } | 4457 } |
4457 }; | 4458 }; |
4458 | 4459 |
4459 } } // namespace v8::internal | 4460 } } // namespace v8::internal |
4460 | 4461 |
4461 #endif // V8_OBJECTS_H_ | 4462 #endif // V8_OBJECTS_H_ |
OLD | NEW |