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

Side by Side Diff: src/snapshot/serializer.h

Issue 2354593002: [base] Template MatchFun in TemplateHashMapImpl (Closed)
Patch Set: Remove bad search-replace 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/profiler/heap-snapshot-generator.cc ('k') | src/snapshot/serializer-common.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_SNAPSHOT_SERIALIZER_H_ 5 #ifndef V8_SNAPSHOT_SERIALIZER_H_
6 #define V8_SNAPSHOT_SERIALIZER_H_ 6 #define V8_SNAPSHOT_SERIALIZER_H_
7 7
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/log.h" 9 #include "src/log.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 20 matching lines...) Expand all
31 void CodeDisableOptEvent(AbstractCode* code, 31 void CodeDisableOptEvent(AbstractCode* code,
32 SharedFunctionInfo* shared) override {} 32 SharedFunctionInfo* shared) override {}
33 33
34 const char* Lookup(Address address) { 34 const char* Lookup(Address address) {
35 return address_to_name_map_.Lookup(address); 35 return address_to_name_map_.Lookup(address);
36 } 36 }
37 37
38 private: 38 private:
39 class NameMap { 39 class NameMap {
40 public: 40 public:
41 NameMap() : impl_(base::HashMap::PointersMatch) {} 41 NameMap() : impl_() {}
42 42
43 ~NameMap() { 43 ~NameMap() {
44 for (base::HashMap::Entry* p = impl_.Start(); p != NULL; 44 for (base::HashMap::Entry* p = impl_.Start(); p != NULL;
45 p = impl_.Next(p)) { 45 p = impl_.Next(p)) {
46 DeleteArray(static_cast<const char*>(p->value)); 46 DeleteArray(static_cast<const char*>(p->value));
47 } 47 }
48 } 48 }
49 49
50 void Insert(Address code_address, const char* name, int name_size) { 50 void Insert(Address code_address, const char* name, int name_size) {
51 base::HashMap::Entry* entry = FindOrCreateEntry(code_address); 51 base::HashMap::Entry* entry = FindOrCreateEntry(code_address);
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 SnapshotByteSink* sink_; 323 SnapshotByteSink* sink_;
324 int reference_representation_; 324 int reference_representation_;
325 int bytes_processed_so_far_; 325 int bytes_processed_so_far_;
326 bool code_has_been_output_; 326 bool code_has_been_output_;
327 }; 327 };
328 328
329 } // namespace internal 329 } // namespace internal
330 } // namespace v8 330 } // namespace v8
331 331
332 #endif // V8_SNAPSHOT_SERIALIZER_H_ 332 #endif // V8_SNAPSHOT_SERIALIZER_H_
OLDNEW
« no previous file with comments | « src/profiler/heap-snapshot-generator.cc ('k') | src/snapshot/serializer-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698