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

Side by Side Diff: src/bootstrapper.cc

Issue 2369963002: [base] Remove PointersMatch, making a separate std::equals hashmap (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3620 matching lines...) Expand 10 before | Expand all | Expand 10 after
3631 WasmJs::Install(isolate, global); 3631 WasmJs::Install(isolate, global);
3632 3632
3633 return true; 3633 return true;
3634 } 3634 }
3635 3635
3636 3636
3637 static uint32_t Hash(RegisteredExtension* extension) { 3637 static uint32_t Hash(RegisteredExtension* extension) {
3638 return v8::internal::ComputePointerHash(extension); 3638 return v8::internal::ComputePointerHash(extension);
3639 } 3639 }
3640 3640
3641 Genesis::ExtensionStates::ExtensionStates() 3641 Genesis::ExtensionStates::ExtensionStates() : map_(8) {}
3642 : map_(base::HashMap::PointersMatch, 8) {}
3643 3642
3644 Genesis::ExtensionTraversalState Genesis::ExtensionStates::get_state( 3643 Genesis::ExtensionTraversalState Genesis::ExtensionStates::get_state(
3645 RegisteredExtension* extension) { 3644 RegisteredExtension* extension) {
3646 base::HashMap::Entry* entry = map_.Lookup(extension, Hash(extension)); 3645 base::HashMap::Entry* entry = map_.Lookup(extension, Hash(extension));
3647 if (entry == NULL) { 3646 if (entry == NULL) {
3648 return UNVISITED; 3647 return UNVISITED;
3649 } 3648 }
3650 return static_cast<ExtensionTraversalState>( 3649 return static_cast<ExtensionTraversalState>(
3651 reinterpret_cast<intptr_t>(entry->value)); 3650 reinterpret_cast<intptr_t>(entry->value));
3652 } 3651 }
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
4184 } 4183 }
4185 4184
4186 4185
4187 // Called when the top-level V8 mutex is destroyed. 4186 // Called when the top-level V8 mutex is destroyed.
4188 void Bootstrapper::FreeThreadResources() { 4187 void Bootstrapper::FreeThreadResources() {
4189 DCHECK(!IsActive()); 4188 DCHECK(!IsActive());
4190 } 4189 }
4191 4190
4192 } // namespace internal 4191 } // namespace internal
4193 } // namespace v8 4192 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698