summaryrefslogtreecommitdiff
path: root/deps/v8/src/utils/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/utils/utils.h')
-rw-r--r--deps/v8/src/utils/utils.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/deps/v8/src/utils/utils.h b/deps/v8/src/utils/utils.h
index 27d3d5ef21..b414a4c52b 100644
--- a/deps/v8/src/utils/utils.h
+++ b/deps/v8/src/utils/utils.h
@@ -760,13 +760,8 @@ inline uint64_t unsigned_bitextract_64(int msb, int lsb, uint64_t x) {
return (x >> lsb) & ((static_cast<uint64_t>(1) << (1 + msb - lsb)) - 1);
}
-inline int32_t signed_bitextract_32(int msb, int lsb, int32_t x) {
- return (x << (31 - msb)) >> (lsb + 31 - msb);
-}
-
-inline int signed_bitextract_64(int msb, int lsb, int x) {
- // TODO(jbramley): This is broken for big bitfields.
- return (x << (63 - msb)) >> (lsb + 63 - msb);
+inline int32_t signed_bitextract_32(int msb, int lsb, uint32_t x) {
+ return static_cast<int32_t>(x << (31 - msb)) >> (lsb + 31 - msb);
}
// Check number width.
@@ -978,8 +973,8 @@ bool DoubleToBoolean(double d);
template <typename Char>
bool TryAddIndexChar(uint32_t* index, Char c);
-template <typename Stream>
-bool StringToArrayIndex(Stream* stream, uint32_t* index);
+template <typename Stream, typename index_t>
+bool StringToArrayIndex(Stream* stream, index_t* index);
// Returns the current stack top. Works correctly with ASAN and SafeStack.
// GetCurrentStackPosition() should not be inlined, because it works on stack