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 2455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2466 | 2466 |
2467 // Initialize or change the enum cache, | 2467 // Initialize or change the enum cache, |
2468 // using the supplied storage for the small "bridge". | 2468 // using the supplied storage for the small "bridge". |
2469 void SetEnumCache(FixedArray* bridge_storage, | 2469 void SetEnumCache(FixedArray* bridge_storage, |
2470 FixedArray* new_cache, | 2470 FixedArray* new_cache, |
2471 Object* new_index_cache); | 2471 Object* new_index_cache); |
2472 | 2472 |
2473 // Accessors for fetching instance descriptor at descriptor number. | 2473 // Accessors for fetching instance descriptor at descriptor number. |
2474 inline String* GetKey(int descriptor_number); | 2474 inline String* GetKey(int descriptor_number); |
2475 inline Object* GetValue(int descriptor_number); | 2475 inline Object* GetValue(int descriptor_number); |
2476 inline Smi* GetDetails(int descriptor_number); | 2476 inline PropertyDetails GetDetails(int descriptor_number); |
2477 inline PropertyType GetType(int descriptor_number); | 2477 inline PropertyType GetType(int descriptor_number); |
2478 inline int GetFieldIndex(int descriptor_number); | 2478 inline int GetFieldIndex(int descriptor_number); |
2479 inline JSFunction* GetConstantFunction(int descriptor_number); | 2479 inline JSFunction* GetConstantFunction(int descriptor_number); |
2480 inline Object* GetCallbacksObject(int descriptor_number); | 2480 inline Object* GetCallbacksObject(int descriptor_number); |
2481 inline AccessorDescriptor* GetCallbacks(int descriptor_number); | 2481 inline AccessorDescriptor* GetCallbacks(int descriptor_number); |
2482 inline bool IsProperty(int descriptor_number); | 2482 inline bool IsProperty(int descriptor_number); |
2483 inline bool IsTransitionOnly(int descriptor_number); | 2483 inline bool IsTransitionOnly(int descriptor_number); |
2484 inline bool IsNullDescriptor(int descriptor_number); | 2484 inline bool IsNullDescriptor(int descriptor_number); |
2485 inline bool IsDontEnum(int descriptor_number); | |
2486 | 2485 |
2487 class WhitenessWitness { | 2486 class WhitenessWitness { |
2488 public: | 2487 public: |
2489 inline explicit WhitenessWitness(DescriptorArray* array); | 2488 inline explicit WhitenessWitness(DescriptorArray* array); |
2490 inline ~WhitenessWitness(); | 2489 inline ~WhitenessWitness(); |
2491 | 2490 |
2492 private: | 2491 private: |
2493 IncrementalMarking* marking_; | 2492 IncrementalMarking* marking_; |
2494 }; | 2493 }; |
2495 | 2494 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2629 } | 2628 } |
2630 | 2629 |
2631 static int ToDetailsIndex(int descriptor_number) { | 2630 static int ToDetailsIndex(int descriptor_number) { |
2632 return (descriptor_number << 1) + 1; | 2631 return (descriptor_number << 1) + 1; |
2633 } | 2632 } |
2634 | 2633 |
2635 static int ToValueIndex(int descriptor_number) { | 2634 static int ToValueIndex(int descriptor_number) { |
2636 return descriptor_number << 1; | 2635 return descriptor_number << 1; |
2637 } | 2636 } |
2638 | 2637 |
2639 bool is_null_descriptor(int descriptor_number) { | |
2640 return PropertyDetails(GetDetails(descriptor_number)).type() == | |
2641 NULL_DESCRIPTOR; | |
2642 } | |
2643 // Swap operation on FixedArray without using write barriers. | 2638 // Swap operation on FixedArray without using write barriers. |
2644 static inline void NoIncrementalWriteBarrierSwap( | 2639 static inline void NoIncrementalWriteBarrierSwap( |
2645 FixedArray* array, int first, int second); | 2640 FixedArray* array, int first, int second); |
2646 | 2641 |
2647 // Swap descriptor first and second. | 2642 // Swap descriptor first and second. |
2648 inline void NoIncrementalWriteBarrierSwapDescriptors( | 2643 inline void NoIncrementalWriteBarrierSwapDescriptors( |
2649 int first, int second); | 2644 int first, int second); |
2650 | 2645 |
2651 FixedArray* GetContentArray() { | 2646 FixedArray* GetContentArray() { |
2652 return FixedArray::cast(get(kContentArrayIndex)); | 2647 return FixedArray::cast(get(kContentArrayIndex)); |
(...skipping 5976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8629 } else { | 8624 } else { |
8630 value &= ~(1 << bit_position); | 8625 value &= ~(1 << bit_position); |
8631 } | 8626 } |
8632 return value; | 8627 return value; |
8633 } | 8628 } |
8634 }; | 8629 }; |
8635 | 8630 |
8636 } } // namespace v8::internal | 8631 } } // namespace v8::internal |
8637 | 8632 |
8638 #endif // V8_OBJECTS_H_ | 8633 #endif // V8_OBJECTS_H_ |
OLD | NEW |