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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 | 1498 |
1499 // Element with given index is stored in slow backing store. | 1499 // Element with given index is stored in slow backing store. |
1500 DICTIONARY_ELEMENT | 1500 DICTIONARY_ELEMENT |
1501 }; | 1501 }; |
1502 | 1502 |
1503 LocalElementType HasLocalElement(uint32_t index); | 1503 LocalElementType HasLocalElement(uint32_t index); |
1504 | 1504 |
1505 bool HasElementWithInterceptor(JSObject* receiver, uint32_t index); | 1505 bool HasElementWithInterceptor(JSObject* receiver, uint32_t index); |
1506 bool HasElementPostInterceptor(JSObject* receiver, uint32_t index); | 1506 bool HasElementPostInterceptor(JSObject* receiver, uint32_t index); |
1507 | 1507 |
1508 MUST_USE_RESULT MaybeObject* SetFastElement(uint32_t index, Object* value); | 1508 MUST_USE_RESULT MaybeObject* SetFastElement(uint32_t index, |
| 1509 Object* value, |
| 1510 bool own = false); |
1509 | 1511 |
1510 // Set the index'th array element. | 1512 // Set the index'th array element. |
1511 // A Failure object is returned if GC is needed. | 1513 // A Failure object is returned if GC is needed. |
1512 MUST_USE_RESULT MaybeObject* SetElement(uint32_t index, Object* value); | 1514 MUST_USE_RESULT MaybeObject* SetElement(uint32_t index, |
| 1515 Object* value, |
| 1516 bool own = false); |
1513 | 1517 |
1514 // Returns the index'th element. | 1518 // Returns the index'th element. |
1515 // The undefined object if index is out of bounds. | 1519 // The undefined object if index is out of bounds. |
1516 MaybeObject* GetElementWithReceiver(JSObject* receiver, uint32_t index); | 1520 MaybeObject* GetElementWithReceiver(JSObject* receiver, uint32_t index); |
1517 MaybeObject* GetElementWithInterceptor(JSObject* receiver, uint32_t index); | 1521 MaybeObject* GetElementWithInterceptor(JSObject* receiver, uint32_t index); |
1518 | 1522 |
1519 MUST_USE_RESULT MaybeObject* SetFastElementsCapacityAndLength(int capacity, | 1523 MUST_USE_RESULT MaybeObject* SetFastElementsCapacityAndLength(int capacity, |
1520 int length); | 1524 int length); |
1521 MUST_USE_RESULT MaybeObject* SetSlowElements(Object* length); | 1525 MUST_USE_RESULT MaybeObject* SetSlowElements(Object* length); |
1522 | 1526 |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1756 private: | 1760 private: |
1757 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver, | 1761 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver, |
1758 Object* structure, | 1762 Object* structure, |
1759 uint32_t index, | 1763 uint32_t index, |
1760 Object* holder); | 1764 Object* holder); |
1761 MaybeObject* SetElementWithCallback(Object* structure, | 1765 MaybeObject* SetElementWithCallback(Object* structure, |
1762 uint32_t index, | 1766 uint32_t index, |
1763 Object* value, | 1767 Object* value, |
1764 JSObject* holder); | 1768 JSObject* holder); |
1765 MUST_USE_RESULT MaybeObject* SetElementWithInterceptor(uint32_t index, | 1769 MUST_USE_RESULT MaybeObject* SetElementWithInterceptor(uint32_t index, |
1766 Object* value); | 1770 Object* value, |
| 1771 bool own); |
1767 MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor(uint32_t index, | 1772 MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor(uint32_t index, |
1768 Object* value); | 1773 Object* value, |
| 1774 bool own); |
1769 | 1775 |
1770 MaybeObject* GetElementPostInterceptor(JSObject* receiver, uint32_t index); | 1776 MaybeObject* GetElementPostInterceptor(JSObject* receiver, uint32_t index); |
1771 | 1777 |
1772 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name, | 1778 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name, |
1773 DeleteMode mode); | 1779 DeleteMode mode); |
1774 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name); | 1780 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name); |
1775 | 1781 |
1776 MUST_USE_RESULT MaybeObject* DeleteElementPostInterceptor(uint32_t index, | 1782 MUST_USE_RESULT MaybeObject* DeleteElementPostInterceptor(uint32_t index, |
1777 DeleteMode mode); | 1783 DeleteMode mode); |
1778 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index); | 1784 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index); |
(...skipping 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6382 } else { | 6388 } else { |
6383 value &= ~(1 << bit_position); | 6389 value &= ~(1 << bit_position); |
6384 } | 6390 } |
6385 return value; | 6391 return value; |
6386 } | 6392 } |
6387 }; | 6393 }; |
6388 | 6394 |
6389 } } // namespace v8::internal | 6395 } } // namespace v8::internal |
6390 | 6396 |
6391 #endif // V8_OBJECTS_H_ | 6397 #endif // V8_OBJECTS_H_ |
OLD | NEW |