Bug 241743 - Introducing RawHex, a counterpart to RawPointer.
Summary: Introducing RawHex, a counterpart to RawPointer.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-18 01:52 PDT by Mark Lam
Modified: 2022-06-18 21:09 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2022-06-18 01:52:51 PDT
RawHex is for dumping integral values in hex just like RawPointer is for dumping pointers.  And similarly, RawHex is meant to be used with PrintStream.

For example:
    dataLog(RawHex(42));        // prints 0x2a
    dataLog(RawHex(0x42);       // prints 0x42
    dataLog(RawHex(256));       // prints 0x100
    dataLog(RawHex(65536);      // prints 0x10000
    dataLog(RawHex(4294967295); // prints 0xffffffff
    dataLog(RawHex(4294967296); // prints 0x100000000
    dataLog(RawHex(INT8_MIN);   // prints 0x80
    dataLog(RawHex(INT16_MIN);  // prints 0x8000
    dataLog(RawHex(INT32_MIN);  // prints 0x80000000
    dataLog(RawHex(-1);         // prints 0xffffffff
    dataLog(RawHex(INT64_MIN);  // prints 0x8000000000000000
    dataLog(RawHex(INT64_MAX);  // prints 0x7fffffffffffffff
    dataLog(RawHex(UINT64_MAX); // prints 0xffffffffffffffff
Comment 1 Mark Lam 2022-06-18 02:04:24 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1613
Comment 2 EWS 2022-06-18 21:08:24 PDT
Committed r295660 (251665@main): <https://commits.webkit.org/251665@main>

Reviewed commits have been landed. Closing PR #1613 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-06-18 21:09:13 PDT
<rdar://problem/95471948>