chromium/v8/src/bigint/bigint-internal.h

// Copyright 2021 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_BIGINT_BIGINT_INTERNAL_H_
#define V8_BIGINT_BIGINT_INTERNAL_H_

#include <memory>

#include "src/bigint/bigint.h"

namespace v8 {
namespace bigint {

constexpr int kKaratsubaThreshold =;
constexpr int kToomThreshold =;
constexpr int kFftThreshold =;
constexpr int kFftInnerThreshold =;

constexpr int kBurnikelThreshold =;
constexpr int kNewtonInversionThreshold =;
// kBarrettThreshold is defined in bigint.h.

constexpr int kToStringFastThreshold =;
constexpr int kFromStringLargeThreshold =;

class ProcessorImpl : public Processor {};

// These constants are primarily needed for Barrett division in div-barrett.cc,
// and they're also needed by fast to-string conversion in tostring.cc.
constexpr int DivideBarrettScratchSpace(int n) {}
// Local values S and W need "n plus a few" digits; U needs 2*n "plus a few".
// In all tested cases the "few" were either 2 or 3, so give 5 to be safe.
// S and W are not live at the same time.
constexpr int kInvertNewtonExtraSpace =;
constexpr int InvertNewtonScratchSpace(int n) {}
constexpr int InvertScratchSpace(int n) {}

#define CHECK(cond)

#ifdef DEBUG
#define DCHECK(cond)
#else
#define DCHECK
#endif

#define USE(var)

// RAII memory for a Digits array.
class Storage {};

// A writable Digits array with attached storage.
class ScratchDigits : public RWDigits {};

}  // namespace bigint
}  // namespace v8

#endif  // V8_BIGINT_BIGINT_INTERNAL_H_