OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
840 String* key, | 840 String* key, |
841 PropertyAttributes* attributes); | 841 PropertyAttributes* attributes); |
842 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver, | 842 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver, |
843 LookupResult* result, | 843 LookupResult* result, |
844 String* key, | 844 String* key, |
845 PropertyAttributes* attributes); | 845 PropertyAttributes* attributes); |
846 MUST_USE_RESULT MaybeObject* GetPropertyWithCallback(Object* receiver, | 846 MUST_USE_RESULT MaybeObject* GetPropertyWithCallback(Object* receiver, |
847 Object* structure, | 847 Object* structure, |
848 String* name, | 848 String* name, |
849 Object* holder); | 849 Object* holder); |
850 MUST_USE_RESULT MaybeObject* GetPropertyWithHandler(Object* receiver, | |
851 String* name, | |
852 Object* handler); | |
853 MUST_USE_RESULT MaybeObject* GetPropertyWithDefinedGetter(Object* receiver, | 850 MUST_USE_RESULT MaybeObject* GetPropertyWithDefinedGetter(Object* receiver, |
854 JSFunction* getter); | 851 JSFunction* getter); |
855 | 852 |
856 inline MaybeObject* GetElement(uint32_t index); | 853 inline MaybeObject* GetElement(uint32_t index); |
857 // For use when we know that no exception can be thrown. | 854 // For use when we know that no exception can be thrown. |
858 inline Object* GetElementNoExceptionThrown(uint32_t index); | 855 inline Object* GetElementNoExceptionThrown(uint32_t index); |
859 MaybeObject* GetElementWithReceiver(Object* receiver, uint32_t index); | 856 MaybeObject* GetElementWithReceiver(Object* receiver, uint32_t index); |
860 | 857 |
861 // Return the object's prototype (might be Heap::null_value()). | 858 // Return the object's prototype (might be Heap::null_value()). |
862 Object* GetPrototype(); | 859 Object* GetPrototype(); |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1381 // Can cause GC. | 1378 // Can cause GC. |
1382 MUST_USE_RESULT MaybeObject* SetProperty(String* key, | 1379 MUST_USE_RESULT MaybeObject* SetProperty(String* key, |
1383 Object* value, | 1380 Object* value, |
1384 PropertyAttributes attributes, | 1381 PropertyAttributes attributes, |
1385 StrictModeFlag strict_mode); | 1382 StrictModeFlag strict_mode); |
1386 MUST_USE_RESULT MaybeObject* SetProperty(LookupResult* result, | 1383 MUST_USE_RESULT MaybeObject* SetProperty(LookupResult* result, |
1387 String* key, | 1384 String* key, |
1388 Object* value, | 1385 Object* value, |
1389 PropertyAttributes attributes, | 1386 PropertyAttributes attributes, |
1390 StrictModeFlag strict_mode); | 1387 StrictModeFlag strict_mode); |
1388 MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSFunction* setter, | |
1389 Object* value); | |
1391 | 1390 |
1392 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode); | 1391 MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode); |
1393 | 1392 |
1394 // Returns the class name ([[Class]] property in the specification). | 1393 // Returns the class name ([[Class]] property in the specification). |
1395 String* class_name(); | 1394 String* class_name(); |
1396 | 1395 |
1397 // Returns the constructor name (the name (possibly, inferred name) of the | 1396 // Returns the constructor name (the name (possibly, inferred name) of the |
1398 // function that was used to instantiate the object). | 1397 // function that was used to instantiate the object). |
1399 String* constructor_name(); | 1398 String* constructor_name(); |
1400 | 1399 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1536 String* name, | 1535 String* name, |
1537 Object* value, | 1536 Object* value, |
1538 bool check_prototype, | 1537 bool check_prototype, |
1539 StrictModeFlag strict_mode); | 1538 StrictModeFlag strict_mode); |
1540 MUST_USE_RESULT MaybeObject* SetPropertyWithCallback( | 1539 MUST_USE_RESULT MaybeObject* SetPropertyWithCallback( |
1541 Object* structure, | 1540 Object* structure, |
1542 String* name, | 1541 String* name, |
1543 Object* value, | 1542 Object* value, |
1544 JSObject* holder, | 1543 JSObject* holder, |
1545 StrictModeFlag strict_mode); | 1544 StrictModeFlag strict_mode); |
1546 MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSFunction* setter, | |
1547 Object* value); | |
1548 MUST_USE_RESULT MaybeObject* SetPropertyWithInterceptor( | 1545 MUST_USE_RESULT MaybeObject* SetPropertyWithInterceptor( |
1549 String* name, | 1546 String* name, |
1550 Object* value, | 1547 Object* value, |
1551 PropertyAttributes attributes, | 1548 PropertyAttributes attributes, |
1552 StrictModeFlag strict_mode); | 1549 StrictModeFlag strict_mode); |
1553 MUST_USE_RESULT MaybeObject* SetPropertyPostInterceptor( | 1550 MUST_USE_RESULT MaybeObject* SetPropertyPostInterceptor( |
1554 String* name, | 1551 String* name, |
1555 Object* value, | 1552 Object* value, |
1556 PropertyAttributes attributes, | 1553 PropertyAttributes attributes, |
1557 StrictModeFlag strict_mode); | 1554 StrictModeFlag strict_mode); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1766 | 1763 |
1767 // Get the header size for a JSObject. Used to compute the index of | 1764 // Get the header size for a JSObject. Used to compute the index of |
1768 // internal fields as well as the number of internal fields. | 1765 // internal fields as well as the number of internal fields. |
1769 inline int GetHeaderSize(); | 1766 inline int GetHeaderSize(); |
1770 | 1767 |
1771 inline int GetInternalFieldCount(); | 1768 inline int GetInternalFieldCount(); |
1772 inline int GetInternalFieldOffset(int index); | 1769 inline int GetInternalFieldOffset(int index); |
1773 inline Object* GetInternalField(int index); | 1770 inline Object* GetInternalField(int index); |
1774 inline void SetInternalField(int index, Object* value); | 1771 inline void SetInternalField(int index, Object* value); |
1775 | 1772 |
1776 // Lookup a property. If found, the result is valid and has | |
1777 // detailed information. | |
1778 void LocalLookup(String* name, LookupResult* result); | |
1779 | |
1780 // The following lookup functions skip interceptors. | 1773 // The following lookup functions skip interceptors. |
1781 void LocalLookupRealNamedProperty(String* name, LookupResult* result); | 1774 void LocalLookupRealNamedProperty(String* name, LookupResult* result); |
1782 void LookupRealNamedProperty(String* name, LookupResult* result); | 1775 void LookupRealNamedProperty(String* name, LookupResult* result); |
1783 void LookupRealNamedPropertyInPrototypes(String* name, LookupResult* result); | 1776 void LookupRealNamedPropertyInPrototypes(String* name, LookupResult* result); |
1784 void LookupCallbackSetterInPrototypes(String* name, LookupResult* result); | 1777 void LookupCallbackSetterInPrototypes(String* name, LookupResult* result); |
1785 MUST_USE_RESULT MaybeObject* SetElementWithCallbackSetterInPrototypes( | 1778 MUST_USE_RESULT MaybeObject* SetElementWithCallbackSetterInPrototypes( |
1786 uint32_t index, Object* value, bool* found, StrictModeFlag strict_mode); | 1779 uint32_t index, Object* value, bool* found, StrictModeFlag strict_mode); |
1787 void LookupCallback(String* name, LookupResult* result); | 1780 void LookupCallback(String* name, LookupResult* result); |
1788 | 1781 |
1789 // Returns the number of properties on this object filtering out properties | 1782 // Returns the number of properties on this object filtering out properties |
(...skipping 4792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6582 class JSProxy: public JSReceiver { | 6575 class JSProxy: public JSReceiver { |
6583 public: | 6576 public: |
6584 // [handler]: The handler property. | 6577 // [handler]: The handler property. |
6585 DECL_ACCESSORS(handler, Object) | 6578 DECL_ACCESSORS(handler, Object) |
6586 | 6579 |
6587 // Casting. | 6580 // Casting. |
6588 static inline JSProxy* cast(Object* obj); | 6581 static inline JSProxy* cast(Object* obj); |
6589 | 6582 |
6590 bool HasPropertyWithHandler(String* name); | 6583 bool HasPropertyWithHandler(String* name); |
6591 | 6584 |
6585 MUST_USE_RESULT MaybeObject* GetPropertyWithHandler( | |
6586 Object* receiver, | |
6587 String* name); | |
6588 | |
6592 MUST_USE_RESULT MaybeObject* SetPropertyWithHandler( | 6589 MUST_USE_RESULT MaybeObject* SetPropertyWithHandler( |
6593 String* name, | 6590 String* name, |
6594 Object* value, | 6591 Object* value, |
6595 PropertyAttributes attributes, | 6592 PropertyAttributes attributes, |
6596 StrictModeFlag strict_mode); | 6593 StrictModeFlag strict_mode); |
6597 | 6594 |
6598 MUST_USE_RESULT MaybeObject* DeletePropertyWithHandler( | 6595 MUST_USE_RESULT MaybeObject* DeletePropertyWithHandler( |
6599 String* name, | 6596 String* name, |
6600 DeleteMode mode); | 6597 DeleteMode mode); |
6601 | 6598 |
6602 MUST_USE_RESULT PropertyAttributes GetPropertyAttributeWithHandler( | 6599 MUST_USE_RESULT PropertyAttributes GetPropertyAttributeWithHandler( |
6603 JSReceiver* receiver, | 6600 JSReceiver* receiver, |
6604 String* name, | 6601 String* name); |
6605 bool* has_exception); | |
6606 | 6602 |
6607 // Turn this into an (empty) JSObject. | 6603 // Turn this into an (empty) JSObject. |
6608 void Fix(); | 6604 void Fix(); |
6609 | 6605 |
6610 // Initializes the body after the handler slot. | 6606 // Initializes the body after the handler slot. |
6611 inline void InitializeBody(int object_size, Object* value); | 6607 inline void InitializeBody(int object_size, Object* value); |
6612 | 6608 |
6609 // Invoke a trap by name. If the trap does not exist on this's handler, | |
6610 // but derived_trap is non-NULL, invoke that instead. May cause GC. | |
6611 Handle<Object> CallTrap(const char* name, | |
6612 Object* derived_trap, | |
6613 int argc, Object*** args); | |
Kevin Millikin (Chromium)
2011/08/31 10:15:31
We consistently use one line per parameter in decl
rossberg
2011/08/31 13:28:32
Done.
| |
6614 | |
6613 // Dispatched behavior. | 6615 // Dispatched behavior. |
6614 #ifdef OBJECT_PRINT | 6616 #ifdef OBJECT_PRINT |
6615 inline void JSProxyPrint() { | 6617 inline void JSProxyPrint() { |
6616 JSProxyPrint(stdout); | 6618 JSProxyPrint(stdout); |
6617 } | 6619 } |
6618 void JSProxyPrint(FILE* out); | 6620 void JSProxyPrint(FILE* out); |
6619 #endif | 6621 #endif |
6620 #ifdef DEBUG | 6622 #ifdef DEBUG |
6621 void JSProxyVerify(); | 6623 void JSProxyVerify(); |
6622 #endif | 6624 #endif |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7351 } else { | 7353 } else { |
7352 value &= ~(1 << bit_position); | 7354 value &= ~(1 << bit_position); |
7353 } | 7355 } |
7354 return value; | 7356 return value; |
7355 } | 7357 } |
7356 }; | 7358 }; |
7357 | 7359 |
7358 } } // namespace v8::internal | 7360 } } // namespace v8::internal |
7359 | 7361 |
7360 #endif // V8_OBJECTS_H_ | 7362 #endif // V8_OBJECTS_H_ |
OLD | NEW |