Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/asmjit/asmjit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/asmjit/core/zonehash.cpp')
-rw-r--r--src/asmjit/core/zonehash.cpp44
1 files changed, 11 insertions, 33 deletions
diff --git a/src/asmjit/core/zonehash.cpp b/src/asmjit/core/zonehash.cpp
index fb48d85..3778fbe 100644
--- a/src/asmjit/core/zonehash.cpp
+++ b/src/asmjit/core/zonehash.cpp
@@ -1,25 +1,7 @@
-// AsmJit - Machine code generation for C++
+// This file is part of AsmJit project <https://asmjit.com>
//
-// * Official AsmJit Home Page: https://asmjit.com
-// * Official Github Repository: https://github.com/asmjit/asmjit
-//
-// Copyright (c) 2008-2020 The AsmJit Authors
-//
-// This software is provided 'as-is', without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. If you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
+// See asmjit.h or LICENSE.md for license and copyright information
+// SPDX-License-Identifier: Zlib
#include "../core/api-build_p.h"
#include "../core/support.h"
@@ -28,9 +10,8 @@
ASMJIT_BEGIN_NAMESPACE
-// ============================================================================
-// [asmjit::ZoneHashBase - Helpers]
-// ============================================================================
+// ZoneHashBase - Prime Numbers
+// ============================
#define ASMJIT_POPULATE_PRIMES(ENTRY) \
ENTRY(2 , 0x80000000, 32), /* [N * 0x80000000 >> 32] (rcp=2147483648) */ \
@@ -183,9 +164,8 @@ static const uint8_t ZoneHash_primeShift[] = {
#undef E
};
-// ============================================================================
-// [asmjit::ZoneHashBase - Rehash]
-// ============================================================================
+// ZoneHashBase - Rehash
+// =====================
void ZoneHashBase::_rehash(ZoneAllocator* allocator, uint32_t primeIndex) noexcept {
ASMJIT_ASSERT(primeIndex < ASMJIT_ARRAY_SIZE(ZoneHash_primeArray));
@@ -225,9 +205,8 @@ void ZoneHashBase::_rehash(ZoneAllocator* allocator, uint32_t primeIndex) noexce
allocator->release(oldData, oldCount * sizeof(ZoneHashNode*));
}
-// ============================================================================
-// [asmjit::ZoneHashBase - Ops]
-// ============================================================================
+// ZoneHashBase - Operations
+// =========================
ZoneHashNode* ZoneHashBase::_insert(ZoneAllocator* allocator, ZoneHashNode* node) noexcept {
uint32_t hashMod = _calcMod(node->_hashCode);
@@ -266,9 +245,8 @@ ZoneHashNode* ZoneHashBase::_remove(ZoneAllocator* allocator, ZoneHashNode* node
return nullptr;
}
-// ============================================================================
-// [asmjit::ZoneHash - Unit]
-// ============================================================================
+// ZoneHashBase - Tests
+// ====================
#if defined(ASMJIT_TEST)
struct MyHashNode : public ZoneHashNode {