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 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4605 inline void set_bit_field(byte value); | 4608 inline void set_bit_field(byte value); |
4606 | 4609 |
4607 // Bit field 2. | 4610 // Bit field 2. |
4608 inline byte bit_field2(); | 4611 inline byte bit_field2(); |
4609 inline void set_bit_field2(byte value); | 4612 inline void set_bit_field2(byte value); |
4610 | 4613 |
4611 // Bit field 3. | 4614 // Bit field 3. |
4612 // TODO(1399): It should be possible to make room for bit_field3 in the map | 4615 // TODO(1399): It should be possible to make room for bit_field3 in the map |
4613 // without overloading the instance descriptors field (and storing it in the | 4616 // without overloading the instance descriptors field (and storing it in the |
4614 // DescriptorArray when the map has one). | 4617 // DescriptorArray when the map has one). |
| 4618 inline void SetOwnBitField3(int value); |
4615 inline int bit_field3(); | 4619 inline int bit_field3(); |
4616 inline void set_bit_field3(int value); | 4620 inline void set_bit_field3(int value); |
4617 | 4621 |
4618 // Tells whether the object in the prototype property will be used | 4622 // Tells whether the object in the prototype property will be used |
4619 // for instances created from this function. If the prototype | 4623 // for instances created from this function. If the prototype |
4620 // property is set to a value that is not a JSObject, the prototype | 4624 // property is set to a value that is not a JSObject, the prototype |
4621 // property will not be used to create instances of the function. | 4625 // property will not be used to create instances of the function. |
4622 // See ECMA-262, 13.2.2. | 4626 // See ECMA-262, 13.2.2. |
4623 inline void set_non_instance_prototype(bool value); | 4627 inline void set_non_instance_prototype(bool value); |
4624 inline bool has_non_instance_prototype(); | 4628 inline bool has_non_instance_prototype(); |
(...skipping 4164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8789 } else { | 8793 } else { |
8790 value &= ~(1 << bit_position); | 8794 value &= ~(1 << bit_position); |
8791 } | 8795 } |
8792 return value; | 8796 return value; |
8793 } | 8797 } |
8794 }; | 8798 }; |
8795 | 8799 |
8796 } } // namespace v8::internal | 8800 } } // namespace v8::internal |
8797 | 8801 |
8798 #endif // V8_OBJECTS_H_ | 8802 #endif // V8_OBJECTS_H_ |
OLD | NEW |