summaryrefslogtreecommitdiff
path: root/chromium/v8/src/bigint/vector-arithmetic.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/v8/src/bigint/vector-arithmetic.h')
-rw-r--r--chromium/v8/src/bigint/vector-arithmetic.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/chromium/v8/src/bigint/vector-arithmetic.h b/chromium/v8/src/bigint/vector-arithmetic.h
new file mode 100644
index 00000000000..617cb20b552
--- /dev/null
+++ b/chromium/v8/src/bigint/vector-arithmetic.h
@@ -0,0 +1,20 @@
+// 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.
+
+// Helper functions that operate on {Digits} vectors of digits.
+
+#ifndef V8_BIGINT_VECTOR_ARITHMETIC_H_
+#define V8_BIGINT_VECTOR_ARITHMETIC_H_
+
+#include "src/bigint/bigint.h"
+
+namespace v8 {
+namespace bigint {
+
+inline bool IsDigitNormalized(Digits X) { return X.len() == 0 || X.msd() != 0; }
+
+} // namespace bigint
+} // namespace v8
+
+#endif // V8_BIGINT_VECTOR_ARITHMETIC_H_