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