Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1114 inline bool IsOverflowed(); | 1114 inline bool IsOverflowed(); |
| 1115 | 1115 |
| 1116 // Mutate this object's map pointer to indicate that the object is | 1116 // Mutate this object's map pointer to indicate that the object is |
| 1117 // overflowed. | 1117 // overflowed. |
| 1118 inline void SetOverflow(); | 1118 inline void SetOverflow(); |
| 1119 | 1119 |
| 1120 // Mutate this object's map pointer to remove the indication that the | 1120 // Mutate this object's map pointer to remove the indication that the |
| 1121 // object is overflowed (ie, partially restore the map pointer). | 1121 // object is overflowed (ie, partially restore the map pointer). |
| 1122 inline void ClearOverflow(); | 1122 inline void ClearOverflow(); |
| 1123 | 1123 |
| 1124 // Returns address of the field at offset in obj. | |
| 1125 inline Address GetFieldAddress(int offset); | |
|
Vitaly Repeshko
2011/03/17 16:52:00
This is "obj->address() + offset". If a helper for
mnaganov (inactive)
2011/03/17 17:37:18
Removed.
| |
| 1126 | |
| 1124 // Returns the field at offset in obj, as a read/write Object* reference. | 1127 // Returns the field at offset in obj, as a read/write Object* reference. |
| 1125 // Does no checking, and is safe to use during GC, while maps are invalid. | 1128 // Does no checking, and is safe to use during GC, while maps are invalid. |
| 1126 // Does not invoke write barrier, so should only be assigned to | 1129 // Does not invoke write barrier, so should only be assigned to |
| 1127 // during marking GC. | 1130 // during marking GC. |
| 1128 static inline Object** RawField(HeapObject* obj, int offset); | 1131 static inline Object** RawField(HeapObject* obj, int offset); |
| 1129 | 1132 |
| 1130 // Casting. | 1133 // Casting. |
| 1131 static inline HeapObject* cast(Object* obj); | 1134 static inline HeapObject* cast(Object* obj); |
| 1132 | 1135 |
| 1133 // Return the write barrier mode for this. Callers of this function | 1136 // Return the write barrier mode for this. Callers of this function |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1580 bool HasRealNamedCallbackProperty(String* key); | 1583 bool HasRealNamedCallbackProperty(String* key); |
| 1581 | 1584 |
| 1582 // Initializes the array to a certain length | 1585 // Initializes the array to a certain length |
| 1583 MUST_USE_RESULT MaybeObject* SetElementsLength(Object* length); | 1586 MUST_USE_RESULT MaybeObject* SetElementsLength(Object* length); |
| 1584 | 1587 |
| 1585 // Get the header size for a JSObject. Used to compute the index of | 1588 // Get the header size for a JSObject. Used to compute the index of |
| 1586 // internal fields as well as the number of internal fields. | 1589 // internal fields as well as the number of internal fields. |
| 1587 inline int GetHeaderSize(); | 1590 inline int GetHeaderSize(); |
| 1588 | 1591 |
| 1589 inline int GetInternalFieldCount(); | 1592 inline int GetInternalFieldCount(); |
| 1593 inline Address GetInternalFieldOffset(int index); | |
|
Vitaly Repeshko
2011/03/17 16:52:00
Since it's called "...Offset" it should return an
mnaganov (inactive)
2011/03/17 17:37:18
Fixed.
| |
| 1590 inline Object* GetInternalField(int index); | 1594 inline Object* GetInternalField(int index); |
| 1591 inline void SetInternalField(int index, Object* value); | 1595 inline void SetInternalField(int index, Object* value); |
| 1592 | 1596 |
| 1593 // Lookup a property. If found, the result is valid and has | 1597 // Lookup a property. If found, the result is valid and has |
| 1594 // detailed information. | 1598 // detailed information. |
| 1595 void LocalLookup(String* name, LookupResult* result); | 1599 void LocalLookup(String* name, LookupResult* result); |
| 1596 void Lookup(String* name, LookupResult* result); | 1600 void Lookup(String* name, LookupResult* result); |
| 1597 | 1601 |
| 1598 // The following lookup functions skip interceptors. | 1602 // The following lookup functions skip interceptors. |
| 1599 void LocalLookupRealNamedProperty(String* name, LookupResult* result); | 1603 void LocalLookupRealNamedProperty(String* name, LookupResult* result); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1693 MUST_USE_RESULT MaybeObject* NormalizeElements(); | 1697 MUST_USE_RESULT MaybeObject* NormalizeElements(); |
| 1694 | 1698 |
| 1695 MUST_USE_RESULT MaybeObject* UpdateMapCodeCache(String* name, Code* code); | 1699 MUST_USE_RESULT MaybeObject* UpdateMapCodeCache(String* name, Code* code); |
| 1696 | 1700 |
| 1697 // Transform slow named properties to fast variants. | 1701 // Transform slow named properties to fast variants. |
| 1698 // Returns failure if allocation failed. | 1702 // Returns failure if allocation failed. |
| 1699 MUST_USE_RESULT MaybeObject* TransformToFastProperties( | 1703 MUST_USE_RESULT MaybeObject* TransformToFastProperties( |
| 1700 int unused_property_fields); | 1704 int unused_property_fields); |
| 1701 | 1705 |
| 1702 // Access fast-case object properties at index. | 1706 // Access fast-case object properties at index. |
| 1707 inline Address GetFastPropertyAddress(int index); | |
|
Vitaly Repeshko
2011/03/17 16:52:00
I think this also should return an offset.
mnaganov (inactive)
2011/03/17 17:37:18
Done.
| |
| 1703 inline Object* FastPropertyAt(int index); | 1708 inline Object* FastPropertyAt(int index); |
| 1704 inline Object* FastPropertyAtPut(int index, Object* value); | 1709 inline Object* FastPropertyAtPut(int index, Object* value); |
| 1705 | 1710 |
| 1706 // Access to in object properties. | 1711 // Access to in object properties. |
| 1707 inline Object* InObjectPropertyAt(int index); | 1712 inline Object* InObjectPropertyAt(int index); |
| 1708 inline Object* InObjectPropertyAtPut(int index, | 1713 inline Object* InObjectPropertyAtPut(int index, |
| 1709 Object* value, | 1714 Object* value, |
| 1710 WriteBarrierMode mode | 1715 WriteBarrierMode mode |
| 1711 = UPDATE_WRITE_BARRIER); | 1716 = UPDATE_WRITE_BARRIER); |
| 1712 | 1717 |
| (...skipping 4871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6584 } else { | 6589 } else { |
| 6585 value &= ~(1 << bit_position); | 6590 value &= ~(1 << bit_position); |
| 6586 } | 6591 } |
| 6587 return value; | 6592 return value; |
| 6588 } | 6593 } |
| 6589 }; | 6594 }; |
| 6590 | 6595 |
| 6591 } } // namespace v8::internal | 6596 } } // namespace v8::internal |
| 6592 | 6597 |
| 6593 #endif // V8_OBJECTS_H_ | 6598 #endif // V8_OBJECTS_H_ |
| OLD | NEW |