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
10
11namespace v8 {
12namespace internal {
13
14class MathRandom : public AllStatic {
15 public:
16 static void InitializeContext(Isolate* isolate,
18
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_
static Address RefillCache(Isolate *isolate, Address raw_native_context)
static void ResetContext(Tagged< Context > native_context)
static const int kStateSize
Definition math-random.h:25
static const int kCacheSize
Definition math-random.h:24
static void InitializeContext(Isolate *isolate, DirectHandle< Context > native_context)
constexpr int kInt64Size
Definition globals.h:402
!IsContextMap !IsContextMap native_context
Definition map-inl.h:877