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

Unified Diff: src/interpreter/constant-array-builder.h

Issue 2204243003: [Interpreter] Avoid dereferencing handles in ConstantPoolArrayBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.cc ('k') | src/interpreter/constant-array-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/constant-array-builder.h
diff --git a/src/interpreter/constant-array-builder.h b/src/interpreter/constant-array-builder.h
index 2e4445af4110684c8fd4ba0023e83d4f4b44ce03..24d4c3298a20624fdef46a73d9db30d2e19d3cdb 100644
--- a/src/interpreter/constant-array-builder.h
+++ b/src/interpreter/constant-array-builder.h
@@ -81,6 +81,7 @@ class ConstantArrayBuilder final BASE_EMBEDDED {
size_t Allocate(Handle<Object> object);
Handle<Object> At(size_t index) const;
void InsertAt(size_t index, Handle<Object> object);
+ bool AllElementsAreUnique() const;
inline size_t available() const { return capacity() - reserved() - size(); }
inline size_t reserved() const { return reserved_; }
@@ -103,11 +104,9 @@ class ConstantArrayBuilder final BASE_EMBEDDED {
ConstantArraySlice* IndexToSlice(size_t index) const;
ConstantArraySlice* OperandSizeToSlice(OperandSize operand_size) const;
- IdentityMap<index_t>* constants_map() { return &constants_map_; }
-
Isolate* isolate_;
ConstantArraySlice* idx_slice_[3];
- IdentityMap<index_t> constants_map_;
+ ZoneMap<Address, index_t> constants_map_;
};
} // namespace interpreter
« no previous file with comments | « src/compiler.cc ('k') | src/interpreter/constant-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698