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 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2329 // [length]: length of the array. | 2329 // [length]: length of the array. |
2330 inline int length(); | 2330 inline int length(); |
2331 inline void set_length(int value); | 2331 inline void set_length(int value); |
2332 | 2332 |
2333 inline static FixedArrayBase* cast(Object* object); | 2333 inline static FixedArrayBase* cast(Object* object); |
2334 | 2334 |
2335 // Layout description. | 2335 // Layout description. |
2336 // Length is smi tagged when it is stored. | 2336 // Length is smi tagged when it is stored. |
2337 static const int kLengthOffset = HeapObject::kHeaderSize; | 2337 static const int kLengthOffset = HeapObject::kHeaderSize; |
2338 static const int kHeaderSize = kLengthOffset + kPointerSize; | 2338 static const int kHeaderSize = kLengthOffset + kPointerSize; |
| 2339 |
| 2340 // Gives access to raw memory which stores the array's data. |
| 2341 inline Object** data_start(); |
2339 }; | 2342 }; |
2340 | 2343 |
2341 | 2344 |
2342 class FixedDoubleArray; | 2345 class FixedDoubleArray; |
2343 class IncrementalMarking; | 2346 class IncrementalMarking; |
2344 | 2347 |
2345 | 2348 |
2346 // FixedArray describes fixed-sized arrays with element type Object*. | 2349 // FixedArray describes fixed-sized arrays with element type Object*. |
2347 class FixedArray: public FixedArrayBase { | 2350 class FixedArray: public FixedArrayBase { |
2348 public: | 2351 public: |
(...skipping 16 matching lines...) Expand all Loading... |
2365 // TODO(isolates): duplicate. | 2368 // TODO(isolates): duplicate. |
2366 inline void set_null(Heap* heap, int index); | 2369 inline void set_null(Heap* heap, int index); |
2367 inline void set_the_hole(int index); | 2370 inline void set_the_hole(int index); |
2368 | 2371 |
2369 // Setters with less debug checks for the GC to use. | 2372 // Setters with less debug checks for the GC to use. |
2370 inline void set_unchecked(int index, Smi* value); | 2373 inline void set_unchecked(int index, Smi* value); |
2371 inline void set_null_unchecked(Heap* heap, int index); | 2374 inline void set_null_unchecked(Heap* heap, int index); |
2372 inline void set_unchecked(Heap* heap, int index, Object* value, | 2375 inline void set_unchecked(Heap* heap, int index, Object* value, |
2373 WriteBarrierMode mode); | 2376 WriteBarrierMode mode); |
2374 | 2377 |
2375 // Gives access to raw memory which stores the array's data. | |
2376 inline Object** data_start(); | |
2377 | |
2378 inline Object** GetFirstElementAddress(); | 2378 inline Object** GetFirstElementAddress(); |
2379 inline bool ContainsOnlySmisOrHoles(); | 2379 inline bool ContainsOnlySmisOrHoles(); |
2380 | 2380 |
2381 // Copy operations. | 2381 // Copy operations. |
2382 MUST_USE_RESULT inline MaybeObject* Copy(); | 2382 MUST_USE_RESULT inline MaybeObject* Copy(); |
2383 MUST_USE_RESULT MaybeObject* CopySize(int new_length); | 2383 MUST_USE_RESULT MaybeObject* CopySize(int new_length); |
2384 | 2384 |
2385 // Add the elements of a JSArray to this FixedArray. | 2385 // Add the elements of a JSArray to this FixedArray. |
2386 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); | 2386 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); |
2387 | 2387 |
(...skipping 6648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9036 } else { | 9036 } else { |
9037 value &= ~(1 << bit_position); | 9037 value &= ~(1 << bit_position); |
9038 } | 9038 } |
9039 return value; | 9039 return value; |
9040 } | 9040 } |
9041 }; | 9041 }; |
9042 | 9042 |
9043 } } // namespace v8::internal | 9043 } } // namespace v8::internal |
9044 | 9044 |
9045 #endif // V8_OBJECTS_H_ | 9045 #endif // V8_OBJECTS_H_ |
OLD | NEW |