OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2832 | 2832 |
2833 template <class T> | 2833 template <class T> |
2834 Handle<T> GetValueChecked(Isolate* isolate, int index) const; | 2834 Handle<T> GetValueChecked(Isolate* isolate, int index) const; |
2835 | 2835 |
2836 // Return a grown copy if the index is bigger than the array's length. | 2836 // Return a grown copy if the index is bigger than the array's length. |
2837 static Handle<FixedArray> SetAndGrow(Handle<FixedArray> array, int index, | 2837 static Handle<FixedArray> SetAndGrow(Handle<FixedArray> array, int index, |
2838 Handle<Object> value); | 2838 Handle<Object> value); |
2839 | 2839 |
2840 // Setter that uses write barrier. | 2840 // Setter that uses write barrier. |
2841 inline void set(int index, Object* value); | 2841 inline void set(int index, Object* value); |
2842 inline bool is_the_hole(int index); | 2842 inline bool is_the_hole(Isolate* isolate, int index); |
2843 | 2843 |
2844 // Setter that doesn't need write barrier. | 2844 // Setter that doesn't need write barrier. |
2845 inline void set(int index, Smi* value); | 2845 inline void set(int index, Smi* value); |
2846 // Setter with explicit barrier mode. | 2846 // Setter with explicit barrier mode. |
2847 inline void set(int index, Object* value, WriteBarrierMode mode); | 2847 inline void set(int index, Object* value, WriteBarrierMode mode); |
2848 | 2848 |
2849 // Setters for frequently used oddballs located in old space. | 2849 // Setters for frequently used oddballs located in old space. |
2850 inline void set_undefined(int index); | 2850 inline void set_undefined(int index); |
2851 inline void set_null(int index); | 2851 inline void set_null(int index); |
2852 inline void set_the_hole(int index); | 2852 inline void set_the_hole(int index); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2922 public: | 2922 public: |
2923 // Setter and getter for elements. | 2923 // Setter and getter for elements. |
2924 inline double get_scalar(int index); | 2924 inline double get_scalar(int index); |
2925 inline uint64_t get_representation(int index); | 2925 inline uint64_t get_representation(int index); |
2926 static inline Handle<Object> get(FixedDoubleArray* array, int index, | 2926 static inline Handle<Object> get(FixedDoubleArray* array, int index, |
2927 Isolate* isolate); | 2927 Isolate* isolate); |
2928 inline void set(int index, double value); | 2928 inline void set(int index, double value); |
2929 inline void set_the_hole(int index); | 2929 inline void set_the_hole(int index); |
2930 | 2930 |
2931 // Checking for the hole. | 2931 // Checking for the hole. |
| 2932 inline bool is_the_hole(Isolate* isolate, int index); |
2932 inline bool is_the_hole(int index); | 2933 inline bool is_the_hole(int index); |
2933 | 2934 |
2934 // Garbage collection support. | 2935 // Garbage collection support. |
2935 inline static int SizeFor(int length) { | 2936 inline static int SizeFor(int length) { |
2936 return kHeaderSize + length * kDoubleSize; | 2937 return kHeaderSize + length * kDoubleSize; |
2937 } | 2938 } |
2938 | 2939 |
2939 // Gives access to raw memory which stores the array's data. | 2940 // Gives access to raw memory which stores the array's data. |
2940 inline double* data_start(); | 2941 inline double* data_start(); |
2941 | 2942 |
(...skipping 8881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11823 } | 11824 } |
11824 return value; | 11825 return value; |
11825 } | 11826 } |
11826 }; | 11827 }; |
11827 | 11828 |
11828 | 11829 |
11829 } // NOLINT, false-positive due to second-order macros. | 11830 } // NOLINT, false-positive due to second-order macros. |
11830 } // NOLINT, false-positive due to second-order macros. | 11831 } // NOLINT, false-positive due to second-order macros. |
11831 | 11832 |
11832 #endif // V8_OBJECTS_H_ | 11833 #endif // V8_OBJECTS_H_ |
OLD | NEW |