v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
math-random.h
Go to the documentation of this file.
1
// Copyright 2018 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef V8_NUMBERS_MATH_RANDOM_H_
6
#define V8_NUMBERS_MATH_RANDOM_H_
7
8
#include "
src/common/globals.h
"
9
#include "
src/objects/contexts.h
"
10
11
namespace
v8
{
12
namespace
internal
{
13
14
class
MathRandom
:
public
AllStatic
{
15
public
:
16
static
void
InitializeContext
(
Isolate
* isolate,
17
DirectHandle<Context>
native_context
);
18
19
static
void
ResetContext
(
Tagged<Context>
native_context
);
20
// Takes native context as a raw Address for ExternalReference usage.
21
// Returns a tagged Smi as a raw Address.
22
static
Address
RefillCache
(
Isolate
* isolate,
Address
raw_native_context);
23
24
static
const
int
kCacheSize
= 64;
25
static
const
int
kStateSize
= 2 *
kInt64Size
;
26
27
struct
State
{
28
uint64_t
s0
;
29
uint64_t
s1
;
30
};
31
};
32
33
}
// namespace internal
34
}
// namespace v8
35
#endif
// V8_NUMBERS_MATH_RANDOM_H_
v8::internal::AllStatic
Definition
globals.h:364
v8::internal::DirectHandle
Definition
handles.h:659
v8::internal::Isolate
Definition
isolate.h:586
v8::internal::MathRandom
Definition
math-random.h:14
v8::internal::MathRandom::RefillCache
static Address RefillCache(Isolate *isolate, Address raw_native_context)
Definition
math-random.cc:35
v8::internal::MathRandom::ResetContext
static void ResetContext(Tagged< Context > native_context)
Definition
math-random.cc:29
v8::internal::MathRandom::kStateSize
static const int kStateSize
Definition
math-random.h:25
v8::internal::MathRandom::kCacheSize
static const int kCacheSize
Definition
math-random.h:24
v8::internal::MathRandom::InitializeContext
static void InitializeContext(Isolate *isolate, DirectHandle< Context > native_context)
Definition
math-random.cc:17
v8::internal::Tagged
Definition
waiter-queue-node.h:21
globals.h
contexts.h
v8::internal::kInt64Size
constexpr int kInt64Size
Definition
globals.h:402
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8::internal::Address
Address
Definition
api-callbacks-inl.h:36
v8::internal::native_context
!IsContextMap !IsContextMap native_context
Definition
map-inl.h:877
v8
Definition
api-arguments-inl.h:19
v8::internal::MathRandom::State
Definition
math-random.h:27
v8::internal::MathRandom::State::s0
uint64_t s0
Definition
math-random.h:28
v8::internal::MathRandom::State::s1
uint64_t s1
Definition
math-random.h:29
src
numbers
math-random.h
Generated on Sun Apr 6 2025 21:08:55 for v8 by
1.12.0