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

Unified Diff: src/hydrogen-instructions.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index b5d2f5176cf381b67f61883a21dbfd196610bcf7..096136a67f2d9f27b921829afe517af092079454 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -6367,6 +6367,22 @@ class HObjectAccess FINAL {
Representation::Smi());
}
+ template <typename CollectionType>
+ static HObjectAccess ForOrderedHashTableBucket(int bucket) {
+ return HObjectAccess(kInobject, CollectionType::kHashTableStartOffset +
+ (bucket * kPointerSize),
+ Representation::Smi());
+ }
+
+ // Access into the data table of an OrderedHashTable with a
+ // known-at-compile-time bucket count.
+ template <typename CollectionType, int kBucketCount>
+ static HObjectAccess ForOrderedHashTableDataTableIndex(int index) {
+ return HObjectAccess(kInobject, CollectionType::kHashTableStartOffset +
+ (kBucketCount * kPointerSize) +
+ (index * kPointerSize));
+ }
+
inline bool Equals(HObjectAccess that) const {
return value_ == that.value_; // portion and offset must match
}
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698