Changeset 49030 in webkit for trunk/JavaScriptCore/runtime
- Timestamp:
- Oct 2, 2009, 11:06:49 AM (16 years ago)
- Location:
- trunk/JavaScriptCore/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSValue.cpp
r49005 r49030 111 111 static const size_t size = 32; 112 112 static char description[size]; 113 if (isInt32()) 113 114 if (!*this) 115 snprintf(description, size, "<JSValue()>"); 116 else if (isInt32()) 114 117 snprintf(description, size, "Int32: %d", asInt32()); 115 118 else if (isDouble()) -
trunk/JavaScriptCore/runtime/JSValue.h
r49005 r49030 214 214 enum { NullTag = 0xfffffffb }; 215 215 enum { UndefinedTag = 0xfffffffa }; 216 enum { DeletedValueTag = 0xfffffff9 }; 216 enum { EmptyValueTag = 0xfffffff9 }; 217 enum { DeletedValueTag = 0xfffffff8 }; 217 218 218 219 enum { LowestTag = DeletedValueTag }; … … 428 429 inline JSValue::JSValue() 429 430 { 430 u.asBits.tag = CellTag;431 u.asBits.tag = EmptyValueTag; 431 432 u.asBits.payload = 0; 432 433 } … … 464 465 inline JSValue::JSValue(JSCell* ptr) 465 466 { 466 u.asBits.tag = CellTag; 467 if (ptr) 468 u.asBits.tag = CellTag; 469 else 470 u.asBits.tag = EmptyValueTag; 467 471 u.asBits.payload = reinterpret_cast<int32_t>(ptr); 468 472 } … … 470 474 inline JSValue::JSValue(const JSCell* ptr) 471 475 { 472 u.asBits.tag = CellTag; 476 if (ptr) 477 u.asBits.tag = CellTag; 478 else 479 u.asBits.tag = EmptyValueTag; 473 480 u.asBits.payload = reinterpret_cast<int32_t>(const_cast<JSCell*>(ptr)); 474 481 } … … 476 483 inline JSValue::operator bool() const 477 484 { 478 return u.asBits.payload || tag() != CellTag; 485 ASSERT(tag() != DeletedValueTag); 486 return tag() != EmptyValueTag; 479 487 } 480 488
Note:
See TracChangeset
for help on using the changeset viewer.