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 3620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |