#include <stdlib.h>
#include <sstream>
#include <utility>
#include "src/init/v8.h"
#include "src/objects/objects-inl.h"
#include "src/objects/objects.h"
#include "src/objects/ordered-hash-table.h"
#include "src/third_party/siphash/halfsiphash.h"
#include "src/utils/utils.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace internal {
class HashcodeTest : public TestWithContext { … };
TEST_F(HashcodeTest, AddHashCodeToFastObjectWithoutProperties) { … }
TEST_F(HashcodeTest, AddHashCodeToFastObjectWithInObjectProperties) { … }
TEST_F(HashcodeTest, AddHashCodeToFastObjectWithPropertiesArray) { … }
TEST_F(HashcodeTest, AddHashCodeToSlowObject) { … }
TEST_F(HashcodeTest, TransitionFastWithInObjectToFastWithPropertyArray) { … }
TEST_F(HashcodeTest, TransitionFastWithPropertyArray) { … }
TEST_F(HashcodeTest, TransitionFastWithPropertyArrayToSlow) { … }
TEST_F(HashcodeTest, TransitionSlowToSlow) { … }
TEST_F(HashcodeTest, TransitionSlowToFastWithoutProperties) { … }
TEST_F(HashcodeTest, TransitionSlowToFastWithPropertyArray) { … }
namespace {
HashFunction;
void TestIntegerHashQuality(const int samples_log2, int num_buckets_log2,
uint64_t seed, double max_var,
HashFunction hash_function) { … }
uint32_t HalfSipHash(uint32_t key, uint64_t seed) { … }
uint32_t JenkinsHash(uint32_t key, uint64_t seed) { … }
uint32_t DefaultHash(uint32_t key, uint64_t seed) { … }
}
void TestIntegerHashQuality(HashFunction hash_function) { … }
TEST_F(HashcodeTest, HalfSipHashQuality) { … }
TEST_F(HashcodeTest, JenkinsHashQuality) { … }
TEST_F(HashcodeTest, DefaultHashQuality) { … }
}
}