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 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2844 inline void set(int index, Object* value); | 2844 inline void set(int index, Object* value); |
2845 inline bool is_the_hole(Isolate* isolate, int index); | 2845 inline bool is_the_hole(Isolate* isolate, int index); |
2846 | 2846 |
2847 // Setter that doesn't need write barrier. | 2847 // Setter that doesn't need write barrier. |
2848 inline void set(int index, Smi* value); | 2848 inline void set(int index, Smi* value); |
2849 // Setter with explicit barrier mode. | 2849 // Setter with explicit barrier mode. |
2850 inline void set(int index, Object* value, WriteBarrierMode mode); | 2850 inline void set(int index, Object* value, WriteBarrierMode mode); |
2851 | 2851 |
2852 // Setters for frequently used oddballs located in old space. | 2852 // Setters for frequently used oddballs located in old space. |
2853 inline void set_undefined(int index); | 2853 inline void set_undefined(int index); |
| 2854 inline void set_undefined(Isolate* isolate, int index); |
2854 inline void set_null(int index); | 2855 inline void set_null(int index); |
| 2856 inline void set_null(Isolate* isolate, int index); |
2855 inline void set_the_hole(int index); | 2857 inline void set_the_hole(int index); |
| 2858 inline void set_the_hole(Isolate* isolate, int index); |
2856 | 2859 |
2857 inline Object** GetFirstElementAddress(); | 2860 inline Object** GetFirstElementAddress(); |
2858 inline bool ContainsOnlySmisOrHoles(); | 2861 inline bool ContainsOnlySmisOrHoles(); |
2859 | 2862 |
2860 // Gives access to raw memory which stores the array's data. | 2863 // Gives access to raw memory which stores the array's data. |
2861 inline Object** data_start(); | 2864 inline Object** data_start(); |
2862 | 2865 |
2863 inline void FillWithHoles(int from, int to); | 2866 inline void FillWithHoles(int from, int to); |
2864 | 2867 |
2865 // Shrink length and insert filler objects. | 2868 // Shrink length and insert filler objects. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2922 | 2925 |
2923 // FixedDoubleArray describes fixed-sized arrays with element type double. | 2926 // FixedDoubleArray describes fixed-sized arrays with element type double. |
2924 class FixedDoubleArray: public FixedArrayBase { | 2927 class FixedDoubleArray: public FixedArrayBase { |
2925 public: | 2928 public: |
2926 // Setter and getter for elements. | 2929 // Setter and getter for elements. |
2927 inline double get_scalar(int index); | 2930 inline double get_scalar(int index); |
2928 inline uint64_t get_representation(int index); | 2931 inline uint64_t get_representation(int index); |
2929 static inline Handle<Object> get(FixedDoubleArray* array, int index, | 2932 static inline Handle<Object> get(FixedDoubleArray* array, int index, |
2930 Isolate* isolate); | 2933 Isolate* isolate); |
2931 inline void set(int index, double value); | 2934 inline void set(int index, double value); |
| 2935 inline void set_the_hole(Isolate* isolate, int index); |
2932 inline void set_the_hole(int index); | 2936 inline void set_the_hole(int index); |
2933 | 2937 |
2934 // Checking for the hole. | 2938 // Checking for the hole. |
2935 inline bool is_the_hole(Isolate* isolate, int index); | 2939 inline bool is_the_hole(Isolate* isolate, int index); |
2936 inline bool is_the_hole(int index); | 2940 inline bool is_the_hole(int index); |
2937 | 2941 |
2938 // Garbage collection support. | 2942 // Garbage collection support. |
2939 inline static int SizeFor(int length) { | 2943 inline static int SizeFor(int length) { |
2940 return kHeaderSize + length * kDoubleSize; | 2944 return kHeaderSize + length * kDoubleSize; |
2941 } | 2945 } |
(...skipping 8925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11867 } | 11871 } |
11868 return value; | 11872 return value; |
11869 } | 11873 } |
11870 }; | 11874 }; |
11871 | 11875 |
11872 | 11876 |
11873 } // NOLINT, false-positive due to second-order macros. | 11877 } // NOLINT, false-positive due to second-order macros. |
11874 } // NOLINT, false-positive due to second-order macros. | 11878 } // NOLINT, false-positive due to second-order macros. |
11875 | 11879 |
11876 #endif // V8_OBJECTS_H_ | 11880 #endif // V8_OBJECTS_H_ |
OLD | NEW |