OLD | NEW |
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_D8_H_ | 5 #ifndef V8_D8_H_ |
6 #define V8_D8_H_ | 6 #define V8_D8_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 71 } |
72 class Iterator { | 72 class Iterator { |
73 public: | 73 public: |
74 explicit Iterator(CounterMap* map) | 74 explicit Iterator(CounterMap* map) |
75 : map_(&map->hash_map_), entry_(map_->Start()) { } | 75 : map_(&map->hash_map_), entry_(map_->Start()) { } |
76 void Next() { entry_ = map_->Next(entry_); } | 76 void Next() { entry_ = map_->Next(entry_); } |
77 bool More() { return entry_ != NULL; } | 77 bool More() { return entry_ != NULL; } |
78 const char* CurrentKey() { return static_cast<const char*>(entry_->key); } | 78 const char* CurrentKey() { return static_cast<const char*>(entry_->key); } |
79 Counter* CurrentValue() { return static_cast<Counter*>(entry_->value); } | 79 Counter* CurrentValue() { return static_cast<Counter*>(entry_->value); } |
80 private: | 80 private: |
81 base::HashMap* map_; | 81 base::CustomMatcherHashMap* map_; |
82 base::HashMap::Entry* entry_; | 82 base::CustomMatcherHashMap::Entry* entry_; |
83 }; | 83 }; |
84 | 84 |
85 private: | 85 private: |
86 static int Hash(const char* name); | 86 static int Hash(const char* name); |
87 static bool Match(void* key1, void* key2); | 87 static bool Match(void* key1, void* key2); |
88 base::HashMap hash_map_; | 88 base::CustomMatcherHashMap hash_map_; |
89 }; | 89 }; |
90 | 90 |
91 | 91 |
92 class SourceGroup { | 92 class SourceGroup { |
93 public: | 93 public: |
94 SourceGroup() : | 94 SourceGroup() : |
95 next_semaphore_(0), | 95 next_semaphore_(0), |
96 done_semaphore_(0), | 96 done_semaphore_(0), |
97 thread_(NULL), | 97 thread_(NULL), |
98 argv_(NULL), | 98 argv_(NULL), |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 static MaybeLocal<Module> FetchModuleTree( | 458 static MaybeLocal<Module> FetchModuleTree( |
459 Isolate* isolate, const std::string& file_name, | 459 Isolate* isolate, const std::string& file_name, |
460 std::map<std::string, Global<Module>>* module_map); | 460 std::map<std::string, Global<Module>>* module_map); |
461 }; | 461 }; |
462 | 462 |
463 | 463 |
464 } // namespace v8 | 464 } // namespace v8 |
465 | 465 |
466 | 466 |
467 #endif // V8_D8_H_ | 467 #endif // V8_D8_H_ |
OLD | NEW |