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

Side by Side Diff: src/objects.h

Issue 779173010: Create optimized inline versions of Map and Set initialization (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Switch to StoreNamedField, shorten constant names Created 6 years 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/hydrogen-instructions.h ('k') | src/runtime/runtime.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 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 3904 matching lines...) Expand 10 before | Expand all | Expand 10 after
3915 static const int kNumberOfElementsIndex = kNumberOfBucketsIndex + 1; 3915 static const int kNumberOfElementsIndex = kNumberOfBucketsIndex + 1;
3916 static const int kNumberOfDeletedElementsIndex = kNumberOfElementsIndex + 1; 3916 static const int kNumberOfDeletedElementsIndex = kNumberOfElementsIndex + 1;
3917 static const int kHashTableStartIndex = kNumberOfDeletedElementsIndex + 1; 3917 static const int kHashTableStartIndex = kNumberOfDeletedElementsIndex + 1;
3918 3918
3919 static const int kNumberOfBucketsOffset = 3919 static const int kNumberOfBucketsOffset =
3920 kHeaderSize + kNumberOfBucketsIndex * kPointerSize; 3920 kHeaderSize + kNumberOfBucketsIndex * kPointerSize;
3921 static const int kNumberOfElementsOffset = 3921 static const int kNumberOfElementsOffset =
3922 kHeaderSize + kNumberOfElementsIndex * kPointerSize; 3922 kHeaderSize + kNumberOfElementsIndex * kPointerSize;
3923 static const int kNumberOfDeletedElementsOffset = 3923 static const int kNumberOfDeletedElementsOffset =
3924 kHeaderSize + kNumberOfDeletedElementsIndex * kPointerSize; 3924 kHeaderSize + kNumberOfDeletedElementsIndex * kPointerSize;
3925 static const int kHashTableStartOffset =
3926 kHeaderSize + kHashTableStartIndex * kPointerSize;
3925 3927
3926 static const int kEntrySize = entrysize + 1; 3928 static const int kEntrySize = entrysize + 1;
3927 static const int kChainOffset = entrysize; 3929 static const int kChainOffset = entrysize;
3928 3930
3929 static const int kLoadFactor = 2; 3931 static const int kLoadFactor = 2;
3930 3932
3931 private: 3933 private:
3932 static Handle<Derived> Rehash(Handle<Derived> table, int new_capacity); 3934 static Handle<Derived> Rehash(Handle<Derived> table, int new_capacity);
3933 3935
3934 void SetNumberOfBuckets(int num) { 3936 void SetNumberOfBuckets(int num) {
(...skipping 7075 matching lines...) Expand 10 before | Expand all | Expand 10 after
11010 } else { 11012 } else {
11011 value &= ~(1 << bit_position); 11013 value &= ~(1 << bit_position);
11012 } 11014 }
11013 return value; 11015 return value;
11014 } 11016 }
11015 }; 11017 };
11016 11018
11017 } } // namespace v8::internal 11019 } } // namespace v8::internal
11018 11020
11019 #endif // V8_OBJECTS_H_ 11021 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698