#include "src/base/utils/random-number-generator.h"
#include <stdio.h>
#include <stdlib.h>
#if defined(V8_OS_STARBOARD)
#include "starboard/system.h"
#endif
#include <algorithm>
#include <new>
#include "src/base/bits.h"
#include "src/base/macros.h"
#include "src/base/platform/mutex.h"
#include "src/base/platform/time.h"
#include "src/base/platform/wrappers.h"
namespace v8 {
namespace base {
static LazyMutex entropy_mutex = …;
static RandomNumberGenerator::EntropySource entropy_source = …;
void RandomNumberGenerator::SetEntropySource(EntropySource source) { … }
RandomNumberGenerator::RandomNumberGenerator() { … }
int RandomNumberGenerator::NextInt(int max) { … }
double RandomNumberGenerator::NextDouble() { … }
int64_t RandomNumberGenerator::NextInt64() { … }
void RandomNumberGenerator::NextBytes(void* buffer, size_t buflen) { … }
static std::vector<uint64_t> ComplementSample(
const std::unordered_set<uint64_t>& set, uint64_t max) { … }
std::vector<uint64_t> RandomNumberGenerator::NextSample(uint64_t max,
size_t n) { … }
std::vector<uint64_t> RandomNumberGenerator::NextSampleSlow(
uint64_t max, size_t n, const std::unordered_set<uint64_t>& excluded) { … }
int RandomNumberGenerator::Next(int bits) { … }
void RandomNumberGenerator::SetSeed(int64_t seed) { … }
uint64_t RandomNumberGenerator::MurmurHash3(uint64_t h) { … }
}
}