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

Unified Diff: src/types.h

Issue 564413003: Explicitly mask enum values to work around probable VS/Win64 compiler bug (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types.h
diff --git a/src/types.h b/src/types.h
index df35c9e3346fc59bb024b965d928ae57705be48a..47f1de726e96cc0fc233a2c91b2defb6f2bad53c 100644
--- a/src/types.h
+++ b/src/types.h
@@ -275,10 +275,13 @@ class TypeImpl : public Config::Base {
// Constructors.
+ // Explicitly mask, since VS on Win64 (wrongly?) sign extends the enum value.
#define DEFINE_TYPE_CONSTRUCTOR(type, value) \
- static TypeImpl* type() { return BitsetType::New(BitsetType::k##type); } \
+ static TypeImpl* type() { \
+ return BitsetType::New(BitsetType::k##type & 0xffffffffu); \
+ } \
static TypeHandle type(Region* region) { \
- return BitsetType::New(BitsetType::k##type, region); \
+ return BitsetType::New(BitsetType::k##type & 0xffffffffu, region); \
}
BITSET_TYPE_LIST(DEFINE_TYPE_CONSTRUCTOR)
#undef DEFINE_TYPE_CONSTRUCTOR
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698