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

Unified Diff: src/shared/utils.h

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 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/shared/test_main.cc ('k') | src/shared/utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/utils.h
diff --git a/src/shared/utils.h b/src/shared/utils.h
index c191ea66220f1427e0dc167370dab81f9c5929a5..c87b68d01e0f755049754cf2144af3e9988fc0d6 100644
--- a/src/shared/utils.h
+++ b/src/shared/utils.h
@@ -9,7 +9,7 @@
#include "src/shared/atomic.h"
#include "src/shared/globals.h"
-namespace fletch {
+namespace dartino {
class Mutex;
@@ -109,7 +109,7 @@ class Utils {
static bool IsUint16(word value) { return (0 <= value) && (value < 65536); }
-#ifdef FLETCH64
+#ifdef DARTINO64
static bool IsInt32(word value) {
return (-(WORD_C(1) << 31) <= value) && (value < (WORD_C(1) << 31));
}
@@ -120,7 +120,7 @@ class Utils {
#endif
static bool SignedAddOverflow(word lhs, word rhs, word* val) {
-#if FLETCH_HAS_BUILTIN_SADDL_OVERFLOW
+#if DARTINO_HAS_BUILTIN_SADDL_OVERFLOW
return __builtin_saddl_overflow(lhs, rhs, val);
#else
uword res = static_cast<uword>(lhs) + static_cast<uword>(rhs);
@@ -131,7 +131,7 @@ class Utils {
}
static bool SignedSubOverflow(word lhs, word rhs, word* val) {
-#if FLETCH_HAS_BUILTIN_SSUBL_OVERFLOW
+#if DARTINO_HAS_BUILTIN_SSUBL_OVERFLOW
return __builtin_ssubl_overflow(lhs, rhs, val);
#else
uword res = static_cast<uword>(lhs) - static_cast<uword>(rhs);
@@ -180,10 +180,10 @@ class Utils {
}
static bool SignedMulOverflow(word lhs, word rhs, word* val) {
-#if FLETCH_HAS_BUILTIN_SMULL_OVERFLOW
+#if DARTINO_HAS_BUILTIN_SMULL_OVERFLOW
return __builtin_smull_overflow(lhs, rhs, val);
#else
-#ifdef FLETCH64
+#ifdef DARTINO64
if (Signed64BitMulMightOverflow(lhs, rhs)) return true;
*val = lhs * rhs;
return false;
@@ -193,8 +193,8 @@ class Utils {
if (overflow) return true;
*val = res;
return false;
-#endif // FLETCH64
-#endif // FLETCH_HAS_BUILTIN_SMULL_OVERFLOW
+#endif // DARTINO64
+#endif // DARTINO_HAS_BUILTIN_SMULL_OVERFLOW
}
// Read a 32-bit integer from the buffer, as little endian.
@@ -280,6 +280,6 @@ class BoolField {
}
};
-} // namespace fletch
+} // namespace dartino
#endif // SRC_SHARED_UTILS_H_
« no previous file with comments | « src/shared/test_main.cc ('k') | src/shared/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698