Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: src/base/bits.h

Issue 2396933002: Revert of Reland "Turn libbase into a component" (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/base-export.h ('k') | src/base/cpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/bits.h
diff --git a/src/base/bits.h b/src/base/bits.h
index b1864940b865c83ba824025452884c08723a7a78..da12ee60fefdad46a6d04cc43199a40bf1009d83 100644
--- a/src/base/bits.h
+++ b/src/base/bits.h
@@ -6,8 +6,6 @@
#define V8_BASE_BITS_H_
#include <stdint.h>
-
-#include "src/base/base-export.h"
#include "src/base/macros.h"
#if V8_CC_MSVC
#include <intrin.h>
@@ -174,7 +172,8 @@
// power of two, it is returned as is. |value| must be less than or equal to
// 0x80000000u. Implementation is from "Hacker's Delight" by Henry S. Warren,
// Jr., figure 3-3, page 48, where the function is called clp2.
-V8_BASE_EXPORT uint32_t RoundUpToPowerOfTwo32(uint32_t value);
+uint32_t RoundUpToPowerOfTwo32(uint32_t value);
+
// RoundDownToPowerOfTwo32(value) returns the greatest power of two which is
// less than or equal to |value|. If you pass in a |value| that is already a
@@ -242,7 +241,7 @@
// SignedMulOverflow32(lhs,rhs,val) performs a signed multiplication of |lhs|
// and |rhs| and stores the result into the variable pointed to by |val| and
// returns true if the signed multiplication resulted in an overflow.
-V8_BASE_EXPORT bool SignedMulOverflow32(int32_t lhs, int32_t rhs, int32_t* val);
+bool SignedMulOverflow32(int32_t lhs, int32_t rhs, int32_t* val);
// SignedAddOverflow64(lhs,rhs,val) performs a signed summation of |lhs| and
// |rhs| and stores the result into the variable pointed to by |val| and
@@ -266,28 +265,31 @@
// SignedMulOverflow64(lhs,rhs,val) performs a signed multiplication of |lhs|
// and |rhs| and stores the result into the variable pointed to by |val| and
// returns true if the signed multiplication resulted in an overflow.
-V8_BASE_EXPORT bool SignedMulOverflow64(int64_t lhs, int64_t rhs, int64_t* val);
+bool SignedMulOverflow64(int64_t lhs, int64_t rhs, int64_t* val);
// SignedMulHigh32(lhs, rhs) multiplies two signed 32-bit values |lhs| and
// |rhs|, extracts the most significant 32 bits of the result, and returns
// those.
-V8_BASE_EXPORT int32_t SignedMulHigh32(int32_t lhs, int32_t rhs);
+int32_t SignedMulHigh32(int32_t lhs, int32_t rhs);
+
// SignedMulHighAndAdd32(lhs, rhs, acc) multiplies two signed 32-bit values
// |lhs| and |rhs|, extracts the most significant 32 bits of the result, and
// adds the accumulate value |acc|.
-V8_BASE_EXPORT int32_t SignedMulHighAndAdd32(int32_t lhs, int32_t rhs,
- int32_t acc);
+int32_t SignedMulHighAndAdd32(int32_t lhs, int32_t rhs, int32_t acc);
+
// SignedDiv32(lhs, rhs) divides |lhs| by |rhs| and returns the quotient
// truncated to int32. If |rhs| is zero, then zero is returned. If |lhs|
// is minint and |rhs| is -1, it returns minint.
-V8_BASE_EXPORT int32_t SignedDiv32(int32_t lhs, int32_t rhs);
+int32_t SignedDiv32(int32_t lhs, int32_t rhs);
+
// SignedMod32(lhs, rhs) divides |lhs| by |rhs| and returns the remainder
// truncated to int32. If either |rhs| is zero or |lhs| is minint and |rhs|
// is -1, it returns zero.
-V8_BASE_EXPORT int32_t SignedMod32(int32_t lhs, int32_t rhs);
+int32_t SignedMod32(int32_t lhs, int32_t rhs);
+
// UnsignedAddOverflow32(lhs,rhs,val) performs an unsigned summation of |lhs|
// and |rhs| and stores the result into the variable pointed to by |val| and
@@ -317,16 +319,18 @@
// Clamp |value| on overflow and underflow conditions.
-V8_BASE_EXPORT int64_t
-FromCheckedNumeric(const internal::CheckedNumeric<int64_t> value);
+int64_t FromCheckedNumeric(const internal::CheckedNumeric<int64_t> value);
+
// SignedSaturatedAdd64(lhs, rhs) adds |lhs| and |rhs|,
// checks and returns the result.
-V8_BASE_EXPORT int64_t SignedSaturatedAdd64(int64_t lhs, int64_t rhs);
+int64_t SignedSaturatedAdd64(int64_t lhs, int64_t rhs);
+
// SignedSaturatedSub64(lhs, rhs) substracts |lhs| by |rhs|,
// checks and returns the result.
-V8_BASE_EXPORT int64_t SignedSaturatedSub64(int64_t lhs, int64_t rhs);
+int64_t SignedSaturatedSub64(int64_t lhs, int64_t rhs);
+
} // namespace bits
} // namespace base
« no previous file with comments | « src/base/base-export.h ('k') | src/base/cpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698