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

Unified Diff: src/base/division-by-constant.cc

Issue 2393603002: Revert of 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/division-by-constant.h ('k') | src/base/file-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/division-by-constant.cc
diff --git a/src/base/division-by-constant.cc b/src/base/division-by-constant.cc
index 3d8fc1a4a9ca473cfa8601a24baca4225ee7809f..5167b7a60c9f0ac9a9f1358c1e7a303e5aa2a737 100644
--- a/src/base/division-by-constant.cc
+++ b/src/base/division-by-constant.cc
@@ -11,6 +11,13 @@
namespace v8 {
namespace base {
+
+template <class T>
+bool MagicNumbersForDivision<T>::operator==(
+ const MagicNumbersForDivision& rhs) const {
+ return multiplier == rhs.multiplier && shift == rhs.shift && add == rhs.add;
+}
+
template <class T>
MagicNumbersForDivision<T> SignedDivisionByConstant(T d) {
@@ -93,6 +100,9 @@
// -----------------------------------------------------------------------------
// Instantiations.
+template struct MagicNumbersForDivision<uint32_t>;
+template struct MagicNumbersForDivision<uint64_t>;
+
template MagicNumbersForDivision<uint32_t> SignedDivisionByConstant(uint32_t d);
template MagicNumbersForDivision<uint64_t> SignedDivisionByConstant(uint64_t d);
« no previous file with comments | « src/base/division-by-constant.h ('k') | src/base/file-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698