Skip to content

Commit 5767628

Browse files
author
lrn@chromium.org
committed
Removed 31-bit smis.
Review URL: http://codereview.chromium.org/267049 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
1 parent 3f1db02 commit 5767628

6 files changed

Lines changed: 12 additions & 747 deletions

File tree

SConstruct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ LIBRARY_FLAGS = {
174174
'LINKFLAGS': ['-m32']
175175
},
176176
'arch:x64': {
177-
'CPPDEFINES': ['V8_TARGET_ARCH_X64', 'V8_LONG_SMI'],
177+
'CPPDEFINES': ['V8_TARGET_ARCH_X64'],
178178
'CCFLAGS': ['-m64'],
179179
'LINKFLAGS': ['-m64'],
180180
},
@@ -200,7 +200,7 @@ LIBRARY_FLAGS = {
200200
'ARFLAGS': ['/MACHINE:X86']
201201
},
202202
'arch:x64': {
203-
'CPPDEFINES': ['V8_TARGET_ARCH_X64', 'V8_LONG_SMI'],
203+
'CPPDEFINES': ['V8_TARGET_ARCH_X64'],
204204
'LINKFLAGS': ['/MACHINE:X64'],
205205
'ARFLAGS': ['/MACHINE:X64']
206206
},

include/v8.h

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ class V8EXPORT Value : public Data {
756756
/** JS == */
757757
bool Equals(Handle<Value> that) const;
758758
bool StrictEquals(Handle<Value> that) const;
759-
759+
760760
private:
761761
inline bool QuickIsString() const;
762762
bool FullIsString() const;
@@ -1036,7 +1036,7 @@ class V8EXPORT String : public Primitive {
10361036
Value(const Value&);
10371037
void operator=(const Value&);
10381038
};
1039-
1039+
10401040
private:
10411041
void VerifyExternalStringResource(ExternalStringResource* val) const;
10421042
static void CheckCast(v8::Value* obj);
@@ -1194,7 +1194,7 @@ class V8EXPORT Object : public Value {
11941194

11951195
/** Gets a native pointer from an internal field. */
11961196
inline void* GetPointerFromInternalField(int index);
1197-
1197+
11981198
/** Sets a native pointer in an internal field. */
11991199
void SetPointerInInternalField(int index, void* value);
12001200

@@ -1247,7 +1247,7 @@ class V8EXPORT Object : public Value {
12471247
bool SetHiddenValue(Handle<String> key, Handle<Value> value);
12481248
Local<Value> GetHiddenValue(Handle<String> key);
12491249
bool DeleteHiddenValue(Handle<String> key);
1250-
1250+
12511251
/**
12521252
* Returns true if this is an instance of an api function (one
12531253
* created from a function created from a function template) and has
@@ -1281,7 +1281,7 @@ class V8EXPORT Object : public Value {
12811281

12821282
/**
12831283
* If quick access to the internal field is possible this method
1284-
* returns the value. Otherwise an empty handle is returned.
1284+
* returns the value. Otherwise an empty handle is returned.
12851285
*/
12861286
inline Local<Value> UncheckedGetInternalField(int index);
12871287
};
@@ -2720,10 +2720,7 @@ const int kHeapObjectTag = 1;
27202720
const int kHeapObjectTagSize = 2;
27212721
const intptr_t kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1;
27222722

2723-
#ifdef V8_LONG_SMI
2724-
#ifndef V8_TARGET_ARCH_X64
2725-
#error "Large smis on non-64-bit platform."
2726-
#endif
2723+
#ifdef V8_TARGET_ARCH_X64
27272724
// Tag information for Smi.
27282725
const int kSmiTag = 0;
27292726
const int kSmiTagSize = 1;
@@ -2774,7 +2771,7 @@ class Internals {
27742771
}
27752772

27762773
static inline int SmiValue(internal::Object* value) {
2777-
#ifdef V8_LONG_SMI
2774+
#ifdef V8_TARGET_ARCH_X64
27782775
int shift_bits = kSmiTagSize + kSmiShiftSize;
27792776
// Shift down and throw away top 32 bits.
27802777
return static_cast<int>(reinterpret_cast<intptr_t>(value) >> shift_bits);

src/objects-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ bool Smi::IsValid(intptr_t value) {
835835
bool in_range = (value >= kMinValue) && (value <= kMaxValue);
836836
#endif
837837

838-
#ifdef V8_LONG_SMI
838+
#ifdef V8_TARGET_ARCH_X64
839839
// To be representable as a long smi, the value must be a 32-bit integer.
840840
bool result = (value == static_cast<int32_t>(value));
841841
#else

0 commit comments

Comments
 (0)