6d706ae3a0
and split Smi out of objects.h into smi.h. Bug: v8:3770, v8:5402 Change-Id: I5ff7461495d29c785a76c79aca2616816a29ab1e Reviewed-on: https://chromium-review.googlesource.com/c/1313035 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Hannes Payer <hpayer@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#57252}
35 lines
890 B
C++
35 lines
890 B
C++
// Copyright 2018 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef V8_MATH_RANDOM_H_
|
|
#define V8_MATH_RANDOM_H_
|
|
|
|
#include "src/contexts.h"
|
|
#include "src/globals.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
class MathRandom : public AllStatic {
|
|
public:
|
|
static void InitializeContext(Isolate* isolate,
|
|
Handle<Context> native_context);
|
|
|
|
static void ResetContext(Context* native_context);
|
|
// Returns a tagged Smi as a raw Address for ExternalReference usage.
|
|
static Address RefillCache(Isolate* isolate, Context* native_context);
|
|
|
|
static const int kCacheSize = 64;
|
|
static const int kStateSize = 2 * kInt64Size;
|
|
|
|
struct State {
|
|
uint64_t s0;
|
|
uint64_t s1;
|
|
};
|
|
};
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|
|
#endif // V8_MATH_RANDOM_H_
|