| 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 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 | 1416 |
| 1417 // Return the object's prototype (might be Heap::null_value()). | 1417 // Return the object's prototype (might be Heap::null_value()). |
| 1418 inline Object* GetPrototype(); | 1418 inline Object* GetPrototype(); |
| 1419 | 1419 |
| 1420 // Set the object's prototype (only JSObject and null are allowed). | 1420 // Set the object's prototype (only JSObject and null are allowed). |
| 1421 Object* SetPrototype(Object* value, bool skip_hidden_prototypes); | 1421 Object* SetPrototype(Object* value, bool skip_hidden_prototypes); |
| 1422 | 1422 |
| 1423 // Tells whether the index'th element is present. | 1423 // Tells whether the index'th element is present. |
| 1424 inline bool HasElement(uint32_t index); | 1424 inline bool HasElement(uint32_t index); |
| 1425 bool HasElementWithReceiver(JSObject* receiver, uint32_t index); | 1425 bool HasElementWithReceiver(JSObject* receiver, uint32_t index); |
| 1426 bool HasLocalElement(uint32_t index); | 1426 |
| 1427 // Tells whether the index'th element is present and how it is stored. |
| 1428 enum LocalElementType { |
| 1429 // There is no element with given index. |
| 1430 UNDEFINED_ELEMENT, |
| 1431 |
| 1432 // Element with given index is handled by interceptor. |
| 1433 INTERCEPTED_ELEMENT, |
| 1434 |
| 1435 // Element with given index is character in string. |
| 1436 STRING_CHARACTER_ELEMENT, |
| 1437 |
| 1438 // Element with given index is stored in fast backing store. |
| 1439 FAST_ELEMENT, |
| 1440 |
| 1441 // Element with given index is stored in slow backing store. |
| 1442 DICTIONARY_ELEMENT |
| 1443 }; |
| 1444 |
| 1445 LocalElementType HasLocalElement(uint32_t index); |
| 1427 | 1446 |
| 1428 bool HasElementWithInterceptor(JSObject* receiver, uint32_t index); | 1447 bool HasElementWithInterceptor(JSObject* receiver, uint32_t index); |
| 1429 bool HasElementPostInterceptor(JSObject* receiver, uint32_t index); | 1448 bool HasElementPostInterceptor(JSObject* receiver, uint32_t index); |
| 1430 | 1449 |
| 1431 Object* SetFastElement(uint32_t index, Object* value); | 1450 Object* SetFastElement(uint32_t index, Object* value); |
| 1432 | 1451 |
| 1433 // Set the index'th array element. | 1452 // Set the index'th array element. |
| 1434 // A Failure object is returned if GC is needed. | 1453 // A Failure object is returned if GC is needed. |
| 1435 Object* SetElement(uint32_t index, Object* value); | 1454 Object* SetElement(uint32_t index, Object* value); |
| 1436 | 1455 |
| (...skipping 4132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5569 } else { | 5588 } else { |
| 5570 value &= ~(1 << bit_position); | 5589 value &= ~(1 << bit_position); |
| 5571 } | 5590 } |
| 5572 return value; | 5591 return value; |
| 5573 } | 5592 } |
| 5574 }; | 5593 }; |
| 5575 | 5594 |
| 5576 } } // namespace v8::internal | 5595 } } // namespace v8::internal |
| 5577 | 5596 |
| 5578 #endif // V8_OBJECTS_H_ | 5597 #endif // V8_OBJECTS_H_ |
| OLD | NEW |