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

Side by Side Diff: src/objects.h

Issue 2041963003: [elements] Precisely estimate elements size for large-object limits (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 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 2629 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Setter that uses write barrier. 2648 // Setter that uses write barrier.
2649 inline void set(int index, Object* value); 2649 inline void set(int index, Object* value);
2650 inline bool is_the_hole(int index); 2650 inline bool is_the_hole(Isolate* isolate, int index);
2651 2651
2652 // Setter that doesn't need write barrier. 2652 // Setter that doesn't need write barrier.
2653 inline void set(int index, Smi* value); 2653 inline void set(int index, Smi* value);
2654 // Setter with explicit barrier mode. 2654 // Setter with explicit barrier mode.
2655 inline void set(int index, Object* value, WriteBarrierMode mode); 2655 inline void set(int index, Object* value, WriteBarrierMode mode);
2656 2656
2657 // Setters for frequently used oddballs located in old space. 2657 // Setters for frequently used oddballs located in old space.
2658 inline void set_undefined(int index); 2658 inline void set_undefined(int index);
2659 inline void set_null(int index); 2659 inline void set_null(int index);
2660 inline void set_the_hole(int index); 2660 inline void set_the_hole(int index);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 public: 2730 public:
2731 // Setter and getter for elements. 2731 // Setter and getter for elements.
2732 inline double get_scalar(int index); 2732 inline double get_scalar(int index);
2733 inline uint64_t get_representation(int index); 2733 inline uint64_t get_representation(int index);
2734 static inline Handle<Object> get(FixedDoubleArray* array, int index, 2734 static inline Handle<Object> get(FixedDoubleArray* array, int index,
2735 Isolate* isolate); 2735 Isolate* isolate);
2736 inline void set(int index, double value); 2736 inline void set(int index, double value);
2737 inline void set_the_hole(int index); 2737 inline void set_the_hole(int index);
2738 2738
2739 // Checking for the hole. 2739 // Checking for the hole.
2740 inline bool is_the_hole(Isolate* isolate, int index);
2740 inline bool is_the_hole(int index); 2741 inline bool is_the_hole(int index);
2741 2742
2742 // Garbage collection support. 2743 // Garbage collection support.
2743 inline static int SizeFor(int length) { 2744 inline static int SizeFor(int length) {
2744 return kHeaderSize + length * kDoubleSize; 2745 return kHeaderSize + length * kDoubleSize;
2745 } 2746 }
2746 2747
2747 // Gives access to raw memory which stores the array's data. 2748 // Gives access to raw memory which stores the array's data.
2748 inline double* data_start(); 2749 inline double* data_start();
2749 2750
(...skipping 8041 matching lines...) Expand 10 before | Expand all | Expand 10 after
10791 } 10792 }
10792 return value; 10793 return value;
10793 } 10794 }
10794 }; 10795 };
10795 10796
10796 10797
10797 } // NOLINT, false-positive due to second-order macros. 10798 } // NOLINT, false-positive due to second-order macros.
10798 } // NOLINT, false-positive due to second-order macros. 10799 } // NOLINT, false-positive due to second-order macros.
10799 10800
10800 #endif // V8_OBJECTS_H_ 10801 #endif // V8_OBJECTS_H_
OLDNEW
« src/elements.cc ('K') | « src/lookup.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698