Changeset 64655 in webkit for trunk/JavaScriptCore/runtime/JSValue.h
- Timestamp:
- Aug 4, 2010, 10:18:07 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSValue.h
r62896 r64655 200 200 201 201 bool isCell() const; 202 JSCell* asCell() const; 202 JSCell*& asCell(); 203 JSCell* const& asCell() const; 203 204 bool isValidCallee(); 204 205 … … 241 242 int32_t payload; 242 243 } asBits; 244 struct { 245 int32_t tag; 246 JSCell* ptr; 247 } asPtr; 243 248 #else 244 249 struct { … … 246 251 int32_t tag; 247 252 } asBits; 253 struct { 254 JSCell* ptr; 255 int32_t tag; 256 } asPtr; 248 257 #endif 249 258 } u; … … 492 501 else 493 502 u.asBits.tag = EmptyValueTag; 494 u.as Bits.payload = reinterpret_cast<int32_t>(ptr);503 u.asPtr.ptr = ptr; 495 504 #if ENABLE(JSC_ZOMBIES) 496 505 ASSERT(!isZombie()); … … 504 513 else 505 514 u.asBits.tag = EmptyValueTag; 506 u.as Bits.payload = reinterpret_cast<int32_t>(const_cast<JSCell*>(ptr));515 u.asPtr.ptr = const_cast<JSCell*>(ptr); 507 516 #if ENABLE(JSC_ZOMBIES) 508 517 ASSERT(!isZombie()); … … 599 608 } 600 609 601 ALWAYS_INLINE JSCell* JSValue::asCell() const610 ALWAYS_INLINE JSCell* const& JSValue::asCell() const 602 611 { 603 612 ASSERT(isCell()); 604 return reinterpret_cast<JSCell*>(u.asBits.payload); 613 return u.asPtr.ptr; 614 } 615 616 ALWAYS_INLINE JSCell*& JSValue::asCell() 617 { 618 ASSERT(isCell()); 619 return u.asPtr.ptr; 605 620 } 606 621
Note:
See TracChangeset
for help on using the changeset viewer.