Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/objects.h

Issue 1322803002: Adding ElementsAccessor::Unshift (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2015-08-28_elements_accessor_pop
Patch Set: less indirections Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/allocation.h" 10 #include "src/allocation.h"
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 class FixedDoubleArray; 2385 class FixedDoubleArray;
2386 class IncrementalMarking; 2386 class IncrementalMarking;
2387 2387
2388 2388
2389 // FixedArray describes fixed-sized arrays with element type Object*. 2389 // FixedArray describes fixed-sized arrays with element type Object*.
2390 class FixedArray: public FixedArrayBase { 2390 class FixedArray: public FixedArrayBase {
2391 public: 2391 public:
2392 // Setter and getter for elements. 2392 // Setter and getter for elements.
2393 inline Object* get(int index) const; 2393 inline Object* get(int index) const;
2394 void SetValue(uint32_t index, Object* value); 2394 void SetValue(uint32_t index, Object* value);
2395 void SetValue(uint32_t index, Object* value, WriteBarrierMode mode);
2395 static inline Handle<Object> get(Handle<FixedArray> array, int index); 2396 static inline Handle<Object> get(Handle<FixedArray> array, int index);
2396 // Setter that uses write barrier. 2397 // Setter that uses write barrier.
2397 inline void set(int index, Object* value); 2398 inline void set(int index, Object* value);
2398 inline bool is_the_hole(int index); 2399 inline bool is_the_hole(int index);
2399 2400
2400 // Setter that doesn't need write barrier. 2401 // Setter that doesn't need write barrier.
2401 inline void set(int index, Smi* value); 2402 inline void set(int index, Smi* value);
2402 // Setter with explicit barrier mode. 2403 // Setter with explicit barrier mode.
2403 inline void set(int index, Object* value, WriteBarrierMode mode); 2404 inline void set(int index, Object* value, WriteBarrierMode mode);
2404 2405
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
4296 4297
4297 inline ElementType get_scalar(int index); 4298 inline ElementType get_scalar(int index);
4298 static inline Handle<Object> get(Handle<FixedTypedArray> array, int index); 4299 static inline Handle<Object> get(Handle<FixedTypedArray> array, int index);
4299 inline void set(int index, ElementType value); 4300 inline void set(int index, ElementType value);
4300 4301
4301 static inline ElementType from_int(int value); 4302 static inline ElementType from_int(int value);
4302 static inline ElementType from_double(double value); 4303 static inline ElementType from_double(double value);
4303 4304
4304 // This accessor applies the correct conversion from Smi, HeapNumber 4305 // This accessor applies the correct conversion from Smi, HeapNumber
4305 // and undefined. 4306 // and undefined.
4306 void SetValue(uint32_t index, Object* value); 4307 inline void SetValue(uint32_t index, Object* value);
4307 4308
4308 DECLARE_PRINTER(FixedTypedArray) 4309 DECLARE_PRINTER(FixedTypedArray)
4309 DECLARE_VERIFIER(FixedTypedArray) 4310 DECLARE_VERIFIER(FixedTypedArray)
4310 4311
4311 private: 4312 private:
4312 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray); 4313 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray);
4313 }; 4314 };
4314 4315
4315 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \ 4316 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \
4316 class Type##ArrayTraits { \ 4317 class Type##ArrayTraits { \
(...skipping 6065 matching lines...) Expand 10 before | Expand all | Expand 10 after
10382 } else { 10383 } else {
10383 value &= ~(1 << bit_position); 10384 value &= ~(1 << bit_position);
10384 } 10385 }
10385 return value; 10386 return value;
10386 } 10387 }
10387 }; 10388 };
10388 10389
10389 } } // namespace v8::internal 10390 } } // namespace v8::internal
10390 10391
10391 #endif // V8_OBJECTS_H_ 10392 #endif // V8_OBJECTS_H_
OLDNEW
« src/elements.cc ('K') | « src/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698