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 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1540 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithReceiver( | 1540 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithReceiver( |
1541 Handle<Object> object, | 1541 Handle<Object> object, |
1542 Handle<Object> receiver, | 1542 Handle<Object> receiver, |
1543 Handle<Name> name, | 1543 Handle<Name> name, |
1544 PropertyAttributes* attributes); | 1544 PropertyAttributes* attributes); |
1545 MUST_USE_RESULT MaybeObject* GetPropertyWithReceiver( | 1545 MUST_USE_RESULT MaybeObject* GetPropertyWithReceiver( |
1546 Object* receiver, | 1546 Object* receiver, |
1547 Name* key, | 1547 Name* key, |
1548 PropertyAttributes* attributes); | 1548 PropertyAttributes* attributes); |
1549 | 1549 |
1550 static Handle<Object> GetPropertyOrElement(Handle<Object> object, | 1550 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyOrElement( |
1551 Handle<Name> key); | 1551 Handle<Object> object, |
| 1552 Handle<Name> key); |
1552 | 1553 |
1553 static Handle<Object> GetProperty(Handle<Object> object, | 1554 static Handle<Object> GetProperty(Handle<Object> object, |
1554 Handle<Name> key); | 1555 Handle<Name> key); |
1555 MUST_USE_RESULT static MaybeHandle<Object> GetProperty( | 1556 MUST_USE_RESULT static MaybeHandle<Object> GetProperty( |
1556 Handle<Object> object, | 1557 Handle<Object> object, |
1557 Handle<Object> receiver, | 1558 Handle<Object> receiver, |
1558 LookupResult* result, | 1559 LookupResult* result, |
1559 Handle<Name> key, | 1560 Handle<Name> key, |
1560 PropertyAttributes* attributes); | 1561 PropertyAttributes* attributes); |
1561 | 1562 |
1562 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver, | 1563 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver, |
1563 LookupResult* result, | 1564 LookupResult* result, |
1564 Name* key, | 1565 Name* key, |
1565 PropertyAttributes* attributes); | 1566 PropertyAttributes* attributes); |
1566 | 1567 |
1567 MUST_USE_RESULT MaybeObject* GetPropertyWithDefinedGetter(Object* receiver, | 1568 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithDefinedGetter( |
1568 JSReceiver* getter); | 1569 Handle<Object> object, |
| 1570 Handle<Object> receiver, |
| 1571 Handle<JSReceiver> getter); |
1569 | 1572 |
1570 static inline Handle<Object> GetElement(Isolate* isolate, | 1573 MUST_USE_RESULT static inline MaybeHandle<Object> GetElement( |
1571 Handle<Object> object, | 1574 Isolate* isolate, |
1572 uint32_t index); | 1575 Handle<Object> object, |
| 1576 uint32_t index); |
1573 | 1577 |
1574 // For use when we know that no exception can be thrown. | 1578 // For use when we know that no exception can be thrown. |
1575 static inline Handle<Object> GetElementNoExceptionThrown( | 1579 static inline Handle<Object> GetElementNoExceptionThrown( |
1576 Isolate* isolate, | 1580 Isolate* isolate, |
1577 Handle<Object> object, | 1581 Handle<Object> object, |
1578 uint32_t index); | 1582 uint32_t index); |
1579 | 1583 |
1580 static Handle<Object> GetElementWithReceiver(Isolate* isolate, | 1584 MUST_USE_RESULT static MaybeHandle<Object> GetElementWithReceiver( |
1581 Handle<Object> object, | 1585 Isolate* isolate, |
1582 Handle<Object> receiver, | 1586 Handle<Object> object, |
1583 uint32_t index); | 1587 Handle<Object> receiver, |
| 1588 uint32_t index); |
1584 | 1589 |
1585 // Return the object's prototype (might be Heap::null_value()). | 1590 // Return the object's prototype (might be Heap::null_value()). |
1586 Object* GetPrototype(Isolate* isolate); | 1591 Object* GetPrototype(Isolate* isolate); |
1587 Map* GetMarkerMap(Isolate* isolate); | 1592 Map* GetMarkerMap(Isolate* isolate); |
1588 | 1593 |
1589 // Returns the permanent hash code associated with this object. May return | 1594 // Returns the permanent hash code associated with this object. May return |
1590 // undefined if not yet created. | 1595 // undefined if not yet created. |
1591 Object* GetHash(); | 1596 Object* GetHash(); |
1592 | 1597 |
1593 // Returns the permanent hash code associated with this object depending on | 1598 // Returns the permanent hash code associated with this object depending on |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2491 Handle<JSObject> object, | 2496 Handle<JSObject> object, |
2492 uint32_t index, | 2497 uint32_t index, |
2493 Handle<Object> value, | 2498 Handle<Object> value, |
2494 PropertyAttributes attributes, | 2499 PropertyAttributes attributes, |
2495 StrictMode strict_mode, | 2500 StrictMode strict_mode, |
2496 bool check_prototype = true, | 2501 bool check_prototype = true, |
2497 SetPropertyMode set_mode = SET_PROPERTY); | 2502 SetPropertyMode set_mode = SET_PROPERTY); |
2498 | 2503 |
2499 // Returns the index'th element. | 2504 // Returns the index'th element. |
2500 // The undefined object if index is out of bounds. | 2505 // The undefined object if index is out of bounds. |
2501 static Handle<Object> GetElementWithInterceptor(Handle<JSObject> object, | 2506 MUST_USE_RESULT static MaybeHandle<Object> GetElementWithInterceptor( |
2502 Handle<Object> receiver, | 2507 Handle<JSObject> object, |
2503 uint32_t index); | 2508 Handle<Object> receiver, |
| 2509 uint32_t index); |
2504 | 2510 |
2505 enum SetFastElementsCapacitySmiMode { | 2511 enum SetFastElementsCapacitySmiMode { |
2506 kAllowSmiElements, | 2512 kAllowSmiElements, |
2507 kForceSmiElements, | 2513 kForceSmiElements, |
2508 kDontAllowSmiElements | 2514 kDontAllowSmiElements |
2509 }; | 2515 }; |
2510 | 2516 |
2511 // Replace the elements' backing store with fast elements of the given | 2517 // Replace the elements' backing store with fast elements of the given |
2512 // capacity. Update the length for JSArrays. Returns the new backing | 2518 // capacity. Update the length for JSArrays. Returns the new backing |
2513 // store. | 2519 // store. |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2781 ElementsKind to_kind); | 2787 ElementsKind to_kind); |
2782 | 2788 |
2783 // Used from Object::GetProperty(). | 2789 // Used from Object::GetProperty(). |
2784 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck( | 2790 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck( |
2785 Handle<JSObject> object, | 2791 Handle<JSObject> object, |
2786 Handle<Object> receiver, | 2792 Handle<Object> receiver, |
2787 LookupResult* result, | 2793 LookupResult* result, |
2788 Handle<Name> name, | 2794 Handle<Name> name, |
2789 PropertyAttributes* attributes); | 2795 PropertyAttributes* attributes); |
2790 | 2796 |
2791 MUST_USE_RESULT static Handle<Object> GetElementWithCallback( | 2797 MUST_USE_RESULT static MaybeHandle<Object> GetElementWithCallback( |
2792 Handle<JSObject> object, | 2798 Handle<JSObject> object, |
2793 Handle<Object> receiver, | 2799 Handle<Object> receiver, |
2794 Handle<Object> structure, | 2800 Handle<Object> structure, |
2795 uint32_t index, | 2801 uint32_t index, |
2796 Handle<Object> holder); | 2802 Handle<Object> holder); |
2797 | 2803 |
2798 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver, | |
2799 Object* structure, | |
2800 uint32_t index, | |
2801 Object* holder); | |
2802 static PropertyAttributes GetElementAttributeWithInterceptor( | 2804 static PropertyAttributes GetElementAttributeWithInterceptor( |
2803 Handle<JSObject> object, | 2805 Handle<JSObject> object, |
2804 Handle<JSReceiver> receiver, | 2806 Handle<JSReceiver> receiver, |
2805 uint32_t index, | 2807 uint32_t index, |
2806 bool continue_search); | 2808 bool continue_search); |
2807 static PropertyAttributes GetElementAttributeWithoutInterceptor( | 2809 static PropertyAttributes GetElementAttributeWithoutInterceptor( |
2808 Handle<JSObject> object, | 2810 Handle<JSObject> object, |
2809 Handle<JSReceiver> receiver, | 2811 Handle<JSReceiver> receiver, |
2810 uint32_t index, | 2812 uint32_t index, |
2811 bool continue_search); | 2813 bool continue_search); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3069 | 3071 |
3070 // Shrink length and insert filler objects. | 3072 // Shrink length and insert filler objects. |
3071 void Shrink(int length); | 3073 void Shrink(int length); |
3072 | 3074 |
3073 // Copy operations. | 3075 // Copy operations. |
3074 MUST_USE_RESULT inline MaybeObject* Copy(); | 3076 MUST_USE_RESULT inline MaybeObject* Copy(); |
3075 MUST_USE_RESULT MaybeObject* CopySize(int new_length, | 3077 MUST_USE_RESULT MaybeObject* CopySize(int new_length, |
3076 PretenureFlag pretenure = NOT_TENURED); | 3078 PretenureFlag pretenure = NOT_TENURED); |
3077 | 3079 |
3078 // Add the elements of a JSArray to this FixedArray. | 3080 // Add the elements of a JSArray to this FixedArray. |
3079 static Handle<FixedArray> AddKeysFromJSArray(Handle<FixedArray> content, | 3081 MUST_USE_RESULT static MaybeHandle<FixedArray> AddKeysFromJSArray( |
3080 Handle<JSArray> array); | 3082 Handle<FixedArray> content, |
| 3083 Handle<JSArray> array); |
3081 | 3084 |
3082 // Computes the union of keys and return the result. | 3085 // Computes the union of keys and return the result. |
3083 // Used for implementing "for (n in object) { }" | 3086 // Used for implementing "for (n in object) { }" |
3084 static Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, | 3087 static Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, |
3085 Handle<FixedArray> second); | 3088 Handle<FixedArray> second); |
3086 | 3089 |
3087 // Copy a sub array from the receiver to dest. | 3090 // Copy a sub array from the receiver to dest. |
3088 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len); | 3091 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len); |
3089 | 3092 |
3090 // Garbage collection support. | 3093 // Garbage collection support. |
(...skipping 7920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11011 } else { | 11014 } else { |
11012 value &= ~(1 << bit_position); | 11015 value &= ~(1 << bit_position); |
11013 } | 11016 } |
11014 return value; | 11017 return value; |
11015 } | 11018 } |
11016 }; | 11019 }; |
11017 | 11020 |
11018 } } // namespace v8::internal | 11021 } } // namespace v8::internal |
11019 | 11022 |
11020 #endif // V8_OBJECTS_H_ | 11023 #endif // V8_OBJECTS_H_ |
OLD | NEW |