OLD | NEW |
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 3638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3649 WasmJs::Install(isolate, global); | 3649 WasmJs::Install(isolate, global); |
3650 | 3650 |
3651 return true; | 3651 return true; |
3652 } | 3652 } |
3653 | 3653 |
3654 | 3654 |
3655 static uint32_t Hash(RegisteredExtension* extension) { | 3655 static uint32_t Hash(RegisteredExtension* extension) { |
3656 return v8::internal::ComputePointerHash(extension); | 3656 return v8::internal::ComputePointerHash(extension); |
3657 } | 3657 } |
3658 | 3658 |
3659 Genesis::ExtensionStates::ExtensionStates() | 3659 Genesis::ExtensionStates::ExtensionStates() : map_(8) {} |
3660 : map_(base::HashMap::PointersMatch, 8) {} | |
3661 | 3660 |
3662 Genesis::ExtensionTraversalState Genesis::ExtensionStates::get_state( | 3661 Genesis::ExtensionTraversalState Genesis::ExtensionStates::get_state( |
3663 RegisteredExtension* extension) { | 3662 RegisteredExtension* extension) { |
3664 base::HashMap::Entry* entry = map_.Lookup(extension, Hash(extension)); | 3663 base::HashMap::Entry* entry = map_.Lookup(extension, Hash(extension)); |
3665 if (entry == NULL) { | 3664 if (entry == NULL) { |
3666 return UNVISITED; | 3665 return UNVISITED; |
3667 } | 3666 } |
3668 return static_cast<ExtensionTraversalState>( | 3667 return static_cast<ExtensionTraversalState>( |
3669 reinterpret_cast<intptr_t>(entry->value)); | 3668 reinterpret_cast<intptr_t>(entry->value)); |
3670 } | 3669 } |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4202 } | 4201 } |
4203 | 4202 |
4204 | 4203 |
4205 // Called when the top-level V8 mutex is destroyed. | 4204 // Called when the top-level V8 mutex is destroyed. |
4206 void Bootstrapper::FreeThreadResources() { | 4205 void Bootstrapper::FreeThreadResources() { |
4207 DCHECK(!IsActive()); | 4206 DCHECK(!IsActive()); |
4208 } | 4207 } |
4209 | 4208 |
4210 } // namespace internal | 4209 } // namespace internal |
4211 } // namespace v8 | 4210 } // namespace v8 |
OLD | NEW |