Revision: 16127
Author: [email protected]
Date: Fri Aug 9 03:33:08 2013
Log: Fix -Wconversion warnings in external V8 headers.
BUG=v8:2830
[email protected]
Review URL: https://codereview.chromium.org/22549003
http://code.google.com/p/v8/source/detail?r=16127
Modified:
/branches/bleeding_edge/include/v8.h
=======================================
--- /branches/bleeding_edge/include/v8.h Wed Aug 7 02:11:39 2013
+++ /branches/bleeding_edge/include/v8.h Fri Aug 9 03:33:08 2013
@@ -5544,14 +5544,14 @@
V8_INLINE(static uint8_t GetNodeFlag(internal::Object** obj, int shift))
{
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset;
- return *addr & (1 << shift);
+ return *addr & static_cast<uint8_t>(1U << shift);
}
V8_INLINE(static void UpdateNodeFlag(internal::Object** obj,
bool value, int shift)) {
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset;
- uint8_t mask = 1 << shift;
- *addr = (*addr & ~mask) | (value << shift);
+ uint8_t mask = static_cast<uint8_t>(1 << shift);
+ *addr = static_cast<uint8_t>((*addr & ~mask) | (value << shift));
}
V8_INLINE(static uint8_t GetNodeState(internal::Object** obj)) {
@@ -5562,7 +5562,7 @@
V8_INLINE(static void UpdateNodeState(internal::Object** obj,
uint8_t value)) {
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset;
- *addr = (*addr & ~kNodeStateMask) | value;
+ *addr = static_cast<uint8_t>((*addr & ~kNodeStateMask) | value);
}
V8_INLINE(static void SetEmbedderData(v8::Isolate* isolate, void* data))
{
@@ -5927,7 +5927,7 @@
TYPE_CHECK(T, Integer);
typedef internal::Internals I;
// Can't simply use INT32_MAX here for whatever reason.
- bool fits_into_int32_t = (i & (1 << 31)) == 0;
+ bool fits_into_int32_t = (i & (1U << 31)) == 0;
if (V8_LIKELY(fits_into_int32_t)) {
Set(static_cast<int32_t>(i));
return;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.