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

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: space 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
« no previous file with comments | « src/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 2384
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);
2395 static inline Handle<Object> get(Handle<FixedArray> array, int index); 2394 static inline Handle<Object> get(Handle<FixedArray> array, int index);
2396 // Setter that uses write barrier. 2395 // Setter that uses write barrier.
2397 inline void set(int index, Object* value); 2396 inline void set(int index, Object* value);
2398 inline bool is_the_hole(int index); 2397 inline bool is_the_hole(int index);
2399 2398
2400 // Setter that doesn't need write barrier. 2399 // Setter that doesn't need write barrier.
2401 inline void set(int index, Smi* value); 2400 inline void set(int index, Smi* value);
2402 // Setter with explicit barrier mode. 2401 // Setter with explicit barrier mode.
2403 inline void set(int index, Object* value, WriteBarrierMode mode); 2402 inline void set(int index, Object* value, WriteBarrierMode mode);
2404 2403
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
2496 }; 2495 };
2497 2496
2498 2497
2499 // FixedDoubleArray describes fixed-sized arrays with element type double. 2498 // FixedDoubleArray describes fixed-sized arrays with element type double.
2500 class FixedDoubleArray: public FixedArrayBase { 2499 class FixedDoubleArray: public FixedArrayBase {
2501 public: 2500 public:
2502 // Setter and getter for elements. 2501 // Setter and getter for elements.
2503 inline double get_scalar(int index); 2502 inline double get_scalar(int index);
2504 inline uint64_t get_representation(int index); 2503 inline uint64_t get_representation(int index);
2505 static inline Handle<Object> get(Handle<FixedDoubleArray> array, int index); 2504 static inline Handle<Object> get(Handle<FixedDoubleArray> array, int index);
2506 // This accessor has to get a Number as |value|.
2507 void SetValue(uint32_t index, Object* value);
2508 inline void set(int index, double value); 2505 inline void set(int index, double value);
2509 inline void set_the_hole(int index); 2506 inline void set_the_hole(int index);
2510 2507
2511 // Checking for the hole. 2508 // Checking for the hole.
2512 inline bool is_the_hole(int index); 2509 inline bool is_the_hole(int index);
2513 2510
2514 // Garbage collection support. 2511 // Garbage collection support.
2515 inline static int SizeFor(int length) { 2512 inline static int SizeFor(int length) {
2516 return kHeaderSize + length * kDoubleSize; 2513 return kHeaderSize + length * kDoubleSize;
2517 } 2514 }
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
4296 4293
4297 inline ElementType get_scalar(int index); 4294 inline ElementType get_scalar(int index);
4298 static inline Handle<Object> get(Handle<FixedTypedArray> array, int index); 4295 static inline Handle<Object> get(Handle<FixedTypedArray> array, int index);
4299 inline void set(int index, ElementType value); 4296 inline void set(int index, ElementType value);
4300 4297
4301 static inline ElementType from_int(int value); 4298 static inline ElementType from_int(int value);
4302 static inline ElementType from_double(double value); 4299 static inline ElementType from_double(double value);
4303 4300
4304 // This accessor applies the correct conversion from Smi, HeapNumber 4301 // This accessor applies the correct conversion from Smi, HeapNumber
4305 // and undefined. 4302 // and undefined.
4306 void SetValue(uint32_t index, Object* value); 4303 inline void SetValue(uint32_t index, Object* value);
4307 4304
4308 DECLARE_PRINTER(FixedTypedArray) 4305 DECLARE_PRINTER(FixedTypedArray)
4309 DECLARE_VERIFIER(FixedTypedArray) 4306 DECLARE_VERIFIER(FixedTypedArray)
4310 4307
4311 private: 4308 private:
4312 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray); 4309 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray);
4313 }; 4310 };
4314 4311
4315 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \ 4312 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \
4316 class Type##ArrayTraits { \ 4313 class Type##ArrayTraits { \
(...skipping 6065 matching lines...) Expand 10 before | Expand all | Expand 10 after
10382 } else { 10379 } else {
10383 value &= ~(1 << bit_position); 10380 value &= ~(1 << bit_position);
10384 } 10381 }
10385 return value; 10382 return value;
10386 } 10383 }
10387 }; 10384 };
10388 10385
10389 } } // namespace v8::internal 10386 } } // namespace v8::internal
10390 10387
10391 #endif // V8_OBJECTS_H_ 10388 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698