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

Unified Diff: include/v8.h

Issue 527603002: Use the "enum hack" to fix the SmiTagging constants. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: fix typo Created 6 years, 4 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 | src/compiler/change-lowering.cc » ('j') | src/compiler/change-lowering.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index cbe8edd59b59349f1492d68853c21ca79f9f122b..d2f3ba2869d668d5e581a5176ea92fea96d1b626 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5606,8 +5606,7 @@ V8_INLINE internal::Object* IntToSmi(int value) {
// Smi constants for 32-bit systems.
template <> struct SmiTagging<4> {
- static const int kSmiShiftSize = 0;
- static const int kSmiValueSize = 31;
+ enum { kSmiShiftSize = 0, kSmiValueSize = 31 };
V8_INLINE static int SmiToInt(const internal::Object* value) {
int shift_bits = kSmiTagSize + kSmiShiftSize;
// Throw away top 32 bits and shift down (requires >> to be sign extending).
@@ -5634,8 +5633,7 @@ template <> struct SmiTagging<4> {
// Smi constants for 64-bit systems.
template <> struct SmiTagging<8> {
- static const int kSmiShiftSize = 31;
- static const int kSmiValueSize = 32;
+ enum { kSmiShiftSize = 31, kSmiValueSize = 32 };
V8_INLINE static int SmiToInt(const internal::Object* value) {
int shift_bits = kSmiTagSize + kSmiShiftSize;
// Shift down and throw away top 32 bits.
« no previous file with comments | « no previous file | src/compiler/change-lowering.cc » ('j') | src/compiler/change-lowering.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698