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

Side by Side Diff: src/interpreter/constant-array-builder.h

Issue 2381303002: [base] Optimise hashmaps with simple key equality (Closed)
Patch Set: Whoops, patches should compile Created 4 years, 2 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/base/hashmap.h ('k') | src/interpreter/constant-array-builder.cc » ('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_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_ 5 #ifndef V8_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_
6 #define V8_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_ 6 #define V8_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_
7 7
8 #include "src/identity-map.h" 8 #include "src/identity-map.h"
9 #include "src/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
10 #include "src/zone/zone-containers.h" 10 #include "src/zone/zone-containers.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 DISALLOW_COPY_AND_ASSIGN(ConstantArraySlice); 101 DISALLOW_COPY_AND_ASSIGN(ConstantArraySlice);
102 }; 102 };
103 103
104 ConstantArraySlice* IndexToSlice(size_t index) const; 104 ConstantArraySlice* IndexToSlice(size_t index) const;
105 ConstantArraySlice* OperandSizeToSlice(OperandSize operand_size) const; 105 ConstantArraySlice* OperandSizeToSlice(OperandSize operand_size) const;
106 106
107 Handle<Object> the_hole_value() const { return the_hole_value_; } 107 Handle<Object> the_hole_value() const { return the_hole_value_; }
108 108
109 ConstantArraySlice* idx_slice_[3]; 109 ConstantArraySlice* idx_slice_[3];
110 base::TemplateHashMapImpl<Address, index_t, std::equal_to<Address>, 110 base::TemplateHashMapImpl<Address, index_t, base::KeyEqualityMatcher<Address>,
111 ZoneAllocationPolicy> 111 ZoneAllocationPolicy>
112 constants_map_; 112 constants_map_;
113 ZoneMap<Smi*, index_t> smi_map_; 113 ZoneMap<Smi*, index_t> smi_map_;
114 ZoneVector<std::pair<Smi*, index_t>> smi_pairs_; 114 ZoneVector<std::pair<Smi*, index_t>> smi_pairs_;
115 Zone* zone_; 115 Zone* zone_;
116 Handle<Object> the_hole_value_; 116 Handle<Object> the_hole_value_;
117 }; 117 };
118 118
119 } // namespace interpreter 119 } // namespace interpreter
120 } // namespace internal 120 } // namespace internal
121 } // namespace v8 121 } // namespace v8
122 122
123 #endif // V8_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_ 123 #endif // V8_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_
OLDNEW
« no previous file with comments | « src/base/hashmap.h ('k') | src/interpreter/constant-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698