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

Side by Side Diff: src/base/hashmap.h

Issue 2071273003: additional includes needed for MIPS toolchain after move of hashmap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | src/profiler/strings-storage.h » ('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 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 // The reason we write our own hash map instead of using unordered_map in STL, 5 // The reason we write our own hash map instead of using unordered_map in STL,
6 // is that STL containers use a mutex pool on debug build, which will lead to 6 // is that STL containers use a mutex pool on debug build, which will lead to
7 // deadlock when we are using async signal handler. 7 // deadlock when we are using async signal handler.
8 8
9 #ifndef V8_BASE_HASHMAP_H_ 9 #ifndef V8_BASE_HASHMAP_H_
10 #define V8_BASE_HASHMAP_H_ 10 #define V8_BASE_HASHMAP_H_
11 11
12 #include <stdlib.h>
13
12 #include "src/base/bits.h" 14 #include "src/base/bits.h"
13 #include "src/base/logging.h" 15 #include "src/base/logging.h"
14 16
15 namespace v8 { 17 namespace v8 {
16 namespace base { 18 namespace base {
17 19
18 class DefaultAllocationPolicy { 20 class DefaultAllocationPolicy {
19 public: 21 public:
20 V8_INLINE void* New(size_t size) { return malloc(size); } 22 V8_INLINE void* New(size_t size) { return malloc(size); }
21 V8_INLINE static void Delete(void* p) { free(p); } 23 V8_INLINE static void Delete(void* p) { free(p); }
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 return Iterator(this, this->LookupOrInsert(key, key->Hash(), allocator)); 343 return Iterator(this, this->LookupOrInsert(key, key->Hash(), allocator));
342 } 344 }
343 return Iterator(this, this->Lookup(key, key->Hash())); 345 return Iterator(this, this->Lookup(key, key->Hash()));
344 } 346 }
345 }; 347 };
346 348
347 } // namespace base 349 } // namespace base
348 } // namespace v8 350 } // namespace v8
349 351
350 #endif // V8_BASE_HASHMAP_H_ 352 #endif // V8_BASE_HASHMAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/profiler/strings-storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698