Changeset 65698 in webkit for trunk/JavaScriptCore/runtime/JSValue.h
- Timestamp:
- Aug 19, 2010, 2:03:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSValue.h
r64684 r65698 398 398 if (isInt32()) 399 399 return asInt32(); 400 401 double val = toNumber(exec); 402 403 if (val >= -2147483648.0 && val < 2147483648.0) 404 return static_cast<int32_t>(val); 405 400 406 bool ignored; 401 return toInt32SlowCase( toNumber(exec), ignored);407 return toInt32SlowCase(val, ignored); 402 408 } 403 409 … … 406 412 if (isUInt32()) 407 413 return asInt32(); 414 415 double val = toNumber(exec); 416 417 if (val >= 0.0 && val < 4294967296.0) 418 return static_cast<uint32_t>(val); 419 408 420 bool ignored; 409 return toUInt32SlowCase( toNumber(exec), ignored);421 return toUInt32SlowCase(val, ignored); 410 422 } 411 423 … … 416 428 return asInt32(); 417 429 } 418 return toInt32SlowCase(toNumber(exec), ok); 430 431 double val = toNumber(exec); 432 433 if (val >= -2147483648.0 && val < 2147483648.0) { 434 ok = true; 435 return static_cast<int32_t>(val); 436 } 437 438 return toInt32SlowCase(val, ok); 419 439 } 420 440 … … 425 445 return asInt32(); 426 446 } 427 return toUInt32SlowCase(toNumber(exec), ok); 447 448 double val = toNumber(exec); 449 450 if (val >= 0.0 && val < 4294967296.0) { 451 ok = true; 452 return static_cast<uint32_t>(val); 453 } 454 455 return toUInt32SlowCase(val, ok); 428 456 } 429 457
Note:
See TracChangeset
for help on using the changeset viewer.