Bug 206619 - [JSC] Bits from Operand should fit in bits reserved in AbstractHeap's Payload
Summary: [JSC] Bits from Operand should fit in bits reserved in AbstractHeap's Payload
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-22 15:24 PST by Yusuke Suzuki
Modified: 2020-01-23 04:50 PST (History)
7 users (show)

See Also:


Attachments
Patch (5.56 KB, patch)
2020-01-22 15:29 PST, Yusuke Suzuki
keith_miller: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2020-01-22 15:24:28 PST
[JSC] Bits from Operand should fit in bits reserved in AbstractHeap's Payload
Comment 1 Yusuke Suzuki 2020-01-22 15:29:17 PST
Created attachment 388475 [details]
Patch
Comment 2 Yusuke Suzuki 2020-01-22 15:29:20 PST
<rdar://problem/58270260>
Comment 3 Keith Miller 2020-01-22 19:25:31 PST
Comment on attachment 388475 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=388475&action=review

r=me with suggestion.

> Source/JavaScriptCore/bytecode/Operands.h:41
> +enum class OperandKind : uint32_t { Argument, Local, Tmp }; // Keep bit-width in sync with Operand::operandKindBits' definition.

Nit You can add a `LastOperandKind = Tmp` then compute kindBits from that via getMSBSet.
Comment 4 Yusuke Suzuki 2020-01-23 01:20:59 PST
Comment on attachment 388475 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=388475&action=review

>> Source/JavaScriptCore/bytecode/Operands.h:41
>> +enum class OperandKind : uint32_t { Argument, Local, Tmp }; // Keep bit-width in sync with Operand::operandKindBits' definition.
> 
> Nit You can add a `LastOperandKind = Tmp` then compute kindBits from that via getMSBSet.

Sounds nice. Fixed.
Comment 5 Yusuke Suzuki 2020-01-23 01:39:19 PST
Committed r254968: <https://trac.webkit.org/changeset/254968>
Comment 6 Yusuke Suzuki 2020-01-23 04:50:12 PST
Follow-up fix. https://trac.webkit.org/changeset/254975/webkit