| 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 | 9 |
| 10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 2627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2638 class IncrementalMarking; | 2638 class IncrementalMarking; |
| 2639 | 2639 |
| 2640 | 2640 |
| 2641 // FixedArray describes fixed-sized arrays with element type Object*. | 2641 // FixedArray describes fixed-sized arrays with element type Object*. |
| 2642 class FixedArray: public FixedArrayBase { | 2642 class FixedArray: public FixedArrayBase { |
| 2643 public: | 2643 public: |
| 2644 // Setter and getter for elements. | 2644 // Setter and getter for elements. |
| 2645 inline Object* get(int index) const; | 2645 inline Object* get(int index) const; |
| 2646 static inline Handle<Object> get(FixedArray* array, int index, | 2646 static inline Handle<Object> get(FixedArray* array, int index, |
| 2647 Isolate* isolate); | 2647 Isolate* isolate); |
| 2648 template <class T> |
| 2649 MaybeHandle<T> GetValue(int index) const; |
| 2650 |
| 2651 template <class T> |
| 2652 Handle<T> GetValueChecked(int index) const; |
| 2653 |
| 2648 // Setter that uses write barrier. | 2654 // Setter that uses write barrier. |
| 2649 inline void set(int index, Object* value); | 2655 inline void set(int index, Object* value); |
| 2650 inline bool is_the_hole(int index); | 2656 inline bool is_the_hole(int index); |
| 2651 | 2657 |
| 2652 // Setter that doesn't need write barrier. | 2658 // Setter that doesn't need write barrier. |
| 2653 inline void set(int index, Smi* value); | 2659 inline void set(int index, Smi* value); |
| 2654 // Setter with explicit barrier mode. | 2660 // Setter with explicit barrier mode. |
| 2655 inline void set(int index, Object* value, WriteBarrierMode mode); | 2661 inline void set(int index, Object* value, WriteBarrierMode mode); |
| 2656 | 2662 |
| 2657 // Setters for frequently used oddballs located in old space. | 2663 // Setters for frequently used oddballs located in old space. |
| (...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4376 | 4382 |
| 4377 // ByteArray represents fixed sized byte arrays. Used for the relocation info | 4383 // ByteArray represents fixed sized byte arrays. Used for the relocation info |
| 4378 // that is attached to code objects. | 4384 // that is attached to code objects. |
| 4379 class ByteArray: public FixedArrayBase { | 4385 class ByteArray: public FixedArrayBase { |
| 4380 public: | 4386 public: |
| 4381 inline int Size(); | 4387 inline int Size(); |
| 4382 | 4388 |
| 4383 // Setter and getter. | 4389 // Setter and getter. |
| 4384 inline byte get(int index); | 4390 inline byte get(int index); |
| 4385 inline void set(int index, byte value); | 4391 inline void set(int index, byte value); |
| 4392 inline const byte* data() const; |
| 4386 | 4393 |
| 4387 // Copy in / copy out whole byte slices. | 4394 // Copy in / copy out whole byte slices. |
| 4388 inline void copy_out(int index, byte* buffer, int length); | 4395 inline void copy_out(int index, byte* buffer, int length); |
| 4389 inline void copy_in(int index, const byte* buffer, int length); | 4396 inline void copy_in(int index, const byte* buffer, int length); |
| 4390 | 4397 |
| 4391 // Treat contents as an int array. | 4398 // Treat contents as an int array. |
| 4392 inline int get_int(int index); | 4399 inline int get_int(int index); |
| 4393 inline void set_int(int index, int value); | 4400 inline void set_int(int index, int value); |
| 4394 | 4401 |
| 4395 static int SizeFor(int length) { | 4402 static int SizeFor(int length) { |
| (...skipping 6502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10898 } | 10905 } |
| 10899 return value; | 10906 return value; |
| 10900 } | 10907 } |
| 10901 }; | 10908 }; |
| 10902 | 10909 |
| 10903 | 10910 |
| 10904 } // NOLINT, false-positive due to second-order macros. | 10911 } // NOLINT, false-positive due to second-order macros. |
| 10905 } // NOLINT, false-positive due to second-order macros. | 10912 } // NOLINT, false-positive due to second-order macros. |
| 10906 | 10913 |
| 10907 #endif // V8_OBJECTS_H_ | 10914 #endif // V8_OBJECTS_H_ |
| OLD | NEW |