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

Side by Side Diff: src/objects.h

Issue 2289493002: Revert of "[heap] Switch to 500k pages" (Closed)
Patch Set: Created 4 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/isolate.cc ('k') | src/snapshot/snapshot.h » ('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 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 #include <memory> 9 #include <memory>
10 10
(...skipping 4784 matching lines...) Expand 10 before | Expand all | Expand 10 after
4795 inline static FreeSpace* cast(HeapObject* obj); 4795 inline static FreeSpace* cast(HeapObject* obj);
4796 4796
4797 // Dispatched behavior. 4797 // Dispatched behavior.
4798 DECLARE_PRINTER(FreeSpace) 4798 DECLARE_PRINTER(FreeSpace)
4799 DECLARE_VERIFIER(FreeSpace) 4799 DECLARE_VERIFIER(FreeSpace)
4800 4800
4801 // Layout description. 4801 // Layout description.
4802 // Size is smi tagged when it is stored. 4802 // Size is smi tagged when it is stored.
4803 static const int kSizeOffset = HeapObject::kHeaderSize; 4803 static const int kSizeOffset = HeapObject::kHeaderSize;
4804 static const int kNextOffset = POINTER_SIZE_ALIGN(kSizeOffset + kPointerSize); 4804 static const int kNextOffset = POINTER_SIZE_ALIGN(kSizeOffset + kPointerSize);
4805 static const int kSize = kNextOffset + kPointerSize;
4806 4805
4807 private: 4806 private:
4808 DISALLOW_IMPLICIT_CONSTRUCTORS(FreeSpace); 4807 DISALLOW_IMPLICIT_CONSTRUCTORS(FreeSpace);
4809 }; 4808 };
4810 4809
4811 4810
4812 // V has parameters (Type, type, TYPE, C type, element_size) 4811 // V has parameters (Type, type, TYPE, C type, element_size)
4813 #define TYPED_ARRAYS(V) \ 4812 #define TYPED_ARRAYS(V) \
4814 V(Uint8, uint8, UINT8, uint8_t, 1) \ 4813 V(Uint8, uint8, UINT8, uint8_t, 1) \
4815 V(Int8, int8, INT8, int8_t, 1) \ 4814 V(Int8, int8, INT8, int8_t, 1) \
(...skipping 5741 matching lines...) Expand 10 before | Expand all | Expand 10 after
10557 DECLARE_PRINTER(JSArray) 10556 DECLARE_PRINTER(JSArray)
10558 DECLARE_VERIFIER(JSArray) 10557 DECLARE_VERIFIER(JSArray)
10559 10558
10560 // Number of element slots to pre-allocate for an empty array. 10559 // Number of element slots to pre-allocate for an empty array.
10561 static const int kPreallocatedArrayElements = 4; 10560 static const int kPreallocatedArrayElements = 4;
10562 10561
10563 // Layout description. 10562 // Layout description.
10564 static const int kLengthOffset = JSObject::kHeaderSize; 10563 static const int kLengthOffset = JSObject::kHeaderSize;
10565 static const int kSize = kLengthOffset + kPointerSize; 10564 static const int kSize = kLengthOffset + kPointerSize;
10566 10565
10567 // 400 * KB is the Page::kMaxRegularHeapObjectSize defined in spaces.h which 10566 // 600 * KB is the Page::kMaxRegularHeapObjectSize defined in spaces.h which
10568 // we do not want to include in objects.h 10567 // we do not want to include in objects.h
10569 // Note that Page::kMaxRegularHeapObjectSize has to be in sync with 10568 // Note that Page::kMaxRegularHeapObjectSize has to be in sync with
10570 // kInitialMaxFastElementArray which is checked in a DCHECK in heap.cc. 10569 // kInitialMaxFastElementArray which is checked in a DCHECK in heap.cc.
10571 static const int kInitialMaxFastElementArray = 10570 static const int kInitialMaxFastElementArray =
10572 (400 * KB - FixedArray::kHeaderSize - kSize - AllocationMemento::kSize) / 10571 (600 * KB - FixedArray::kHeaderSize - kSize - AllocationMemento::kSize) /
10573 kPointerSize; 10572 kPointerSize;
10574 10573
10575 private: 10574 private:
10576 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray); 10575 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray);
10577 }; 10576 };
10578 10577
10579 10578
10580 Handle<Object> CacheInitialJSArrayMaps(Handle<Context> native_context, 10579 Handle<Object> CacheInitialJSArrayMaps(Handle<Context> native_context,
10581 Handle<Map> initial_map); 10580 Handle<Map> initial_map);
10582 10581
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
11180 } 11179 }
11181 return value; 11180 return value;
11182 } 11181 }
11183 }; 11182 };
11184 11183
11185 11184
11186 } // NOLINT, false-positive due to second-order macros. 11185 } // NOLINT, false-positive due to second-order macros.
11187 } // NOLINT, false-positive due to second-order macros. 11186 } // NOLINT, false-positive due to second-order macros.
11188 11187
11189 #endif // V8_OBJECTS_H_ 11188 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/snapshot/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698