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 2483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2494 | 2494 |
2495 // Initialize or change the enum cache, | 2495 // Initialize or change the enum cache, |
2496 // using the supplied storage for the small "bridge". | 2496 // using the supplied storage for the small "bridge". |
2497 void SetEnumCache(FixedArray* bridge_storage, | 2497 void SetEnumCache(FixedArray* bridge_storage, |
2498 FixedArray* new_cache, | 2498 FixedArray* new_cache, |
2499 Object* new_index_cache); | 2499 Object* new_index_cache); |
2500 | 2500 |
2501 // Accessors for fetching instance descriptor at descriptor number. | 2501 // Accessors for fetching instance descriptor at descriptor number. |
2502 inline String* GetKey(int descriptor_number); | 2502 inline String* GetKey(int descriptor_number); |
2503 inline Object** GetKeySlot(int descriptor_number); | 2503 inline Object** GetKeySlot(int descriptor_number); |
2504 inline void SetKeyUnchecked(Heap* heap, int descriptor_number, String* value); | |
2504 inline Object* GetValue(int descriptor_number); | 2505 inline Object* GetValue(int descriptor_number); |
2505 inline Object** GetValueSlot(int descriptor_number); | 2506 inline Object** GetValueSlot(int descriptor_number); |
2506 inline void SetNullValueUnchecked(int descriptor_number, Heap* heap); | 2507 inline void SetNullValueUnchecked(Heap* heap, int descriptor_number); |
2508 inline void SetValueUnchecked(Heap* heap, | |
2509 int descriptor_number, | |
2510 Object* value); | |
2507 inline PropertyDetails GetDetails(int descriptor_number); | 2511 inline PropertyDetails GetDetails(int descriptor_number); |
2508 inline void SetDetailsUnchecked(int descriptor_number, Smi* value); | 2512 inline void SetDetailsUnchecked(int descriptor_number, Smi* value); |
2509 inline PropertyType GetType(int descriptor_number); | 2513 inline PropertyType GetType(int descriptor_number); |
2510 inline int GetFieldIndex(int descriptor_number); | 2514 inline int GetFieldIndex(int descriptor_number); |
2511 inline JSFunction* GetConstantFunction(int descriptor_number); | 2515 inline JSFunction* GetConstantFunction(int descriptor_number); |
2512 inline Object* GetCallbacksObject(int descriptor_number); | 2516 inline Object* GetCallbacksObject(int descriptor_number); |
2513 inline AccessorDescriptor* GetCallbacks(int descriptor_number); | 2517 inline AccessorDescriptor* GetCallbacks(int descriptor_number); |
2514 inline bool IsProperty(int descriptor_number); | 2518 inline bool IsProperty(int descriptor_number); |
2515 inline bool IsTransitionOnly(int descriptor_number); | 2519 inline bool IsTransitionOnly(int descriptor_number); |
2516 inline bool IsNullDescriptor(int descriptor_number); | |
2517 | 2520 |
2518 // WhitenessWitness is used to prove that a specific descriptor array is white | 2521 // WhitenessWitness is used to prove that a specific descriptor array is white |
2519 // (unmarked), so incremental write barriers can be skipped because the | 2522 // (unmarked), so incremental write barriers can be skipped because the |
2520 // marking invariant cannot be broken and slots pointing into evacuation | 2523 // marking invariant cannot be broken and slots pointing into evacuation |
2521 // candidates will be discovered when the object is scanned. A witness is | 2524 // candidates will be discovered when the object is scanned. A witness is |
2522 // always stack-allocated right after creating a descriptor array. By | 2525 // always stack-allocated right after creating a descriptor array. By |
2523 // allocating a witness, incremental marking is globally disabled. The witness | 2526 // allocating a witness, incremental marking is globally disabled. The witness |
2524 // is then passed along wherever needed to statically prove that the | 2527 // is then passed along wherever needed to statically prove that the |
2525 // descriptor array is known to be white. | 2528 // descriptor array is known to be white. |
2526 class WhitenessWitness { | 2529 class WhitenessWitness { |
(...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4762 | 4765 |
4763 inline JSFunction* unchecked_constructor(); | 4766 inline JSFunction* unchecked_constructor(); |
4764 | 4767 |
4765 // Should only be called by the code that initializes map to set initial valid | 4768 // Should only be called by the code that initializes map to set initial valid |
4766 // value of the instance descriptor member. | 4769 // value of the instance descriptor member. |
4767 inline void init_instance_descriptors(); | 4770 inline void init_instance_descriptors(); |
4768 | 4771 |
4769 // [instance descriptors]: describes the object. | 4772 // [instance descriptors]: describes the object. |
4770 DECL_ACCESSORS(instance_descriptors, DescriptorArray) | 4773 DECL_ACCESSORS(instance_descriptors, DescriptorArray) |
4771 | 4774 |
4775 // Should only be called to clear a descriptor array that was only used to | |
4776 // store transitions, which does not contain any live transitions anymore. | |
Michael Starzinger
2012/06/25 12:48:38
"[...] store transitions and does not [...]"
| |
4777 inline void ClearDescriptorArray(); | |
4778 | |
4772 // Sets the instance descriptor array for the map to be an empty descriptor | 4779 // Sets the instance descriptor array for the map to be an empty descriptor |
4773 // array. | 4780 // array. |
4774 inline void clear_instance_descriptors(); | 4781 inline void clear_instance_descriptors(); |
4775 | 4782 |
4776 // [stub cache]: contains stubs compiled for this map. | 4783 // [stub cache]: contains stubs compiled for this map. |
4777 DECL_ACCESSORS(code_cache, Object) | 4784 DECL_ACCESSORS(code_cache, Object) |
4778 | 4785 |
4779 // [back pointer]: points back to the parent map from which a transition | 4786 // [back pointer]: points back to the parent map from which a transition |
4780 // leads to this map. The field overlaps with prototype transitions and the | 4787 // leads to this map. The field overlaps with prototype transitions and the |
4781 // back pointer will be moved into the prototype transitions array if | 4788 // back pointer will be moved into the prototype transitions array if |
(...skipping 4007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8789 } else { | 8796 } else { |
8790 value &= ~(1 << bit_position); | 8797 value &= ~(1 << bit_position); |
8791 } | 8798 } |
8792 return value; | 8799 return value; |
8793 } | 8800 } |
8794 }; | 8801 }; |
8795 | 8802 |
8796 } } // namespace v8::internal | 8803 } } // namespace v8::internal |
8797 | 8804 |
8798 #endif // V8_OBJECTS_H_ | 8805 #endif // V8_OBJECTS_H_ |
OLD | NEW |