[Webkit-unassigned] [Bug 203604] codeBlock->expressionRangeForBytecodeIndex() returns wrong range for op_bitxor, op_bitand, op_bitor (and op_bitnot)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 30 04:08:02 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=203604
--- Comment #1 from Tuomas Karkkainen <tuomas.webkit at apple.com> ---
for the JavaScript:
> function bar() {}
>
> function foo()
> {
> let i = 0;
> i ^= 0;
> i &= 0;
> i |= 0;
> bar();
> }
>
> foo();
> foo();
the bytecode is:
> foo#BAHEl0:[0x108aa0140->0x108ac7c00, NoneFunctionCall, 51]: 13 instructions (0 16-bit instructions, 0 32-bit instructions, 6 instructions with metadata); 159 bytes (108 metadata bytes); 1 parameter(s); 14 callee register(s); 6 variable(s); scope at loc4
> [ 0] enter
> [ 1] get_scope loc4
> [ 3] mov loc5, loc4
> [ 6] check_traps
> [ 7] mov loc6, <JSValue()>(const0)
> [ 10] mov loc6, Int32: 0(const1)
> [ 13] bitxor loc6, loc6, Int32: 0(const1)
> [ 18] bitand loc6, loc6, Int32: 0(const1)
> [ 23] bitor loc6, loc6, Int32: 0(const1)
> [ 28] resolve_scope loc8, loc4, 0, GlobalProperty, 0
> [ 35] get_from_scope loc7, loc8, 0, 2048<ThrowIfNotFound|GlobalProperty|NotInitialization>, 0, 0
> [ 43] call loc7, loc7, 1, 14
> [ 49] ret Undefined(const2)
>
> Identifiers:
> id0 = bar
>
> Constants:
> k0 = <JSValue()>
> k1 = Int32: 0: in source as integer
> k2 = Undefined
output of codeBlock->unlinkedCodeBlock()->dumpExpressionRangeInfo() is:
> UnlinkedCodeBlock 0x108a98000 expressionRangeInfo[2] {
> [0] pc 28 @ line 6 col 5 : op_resolve_scope
> [1] pc 43 @ line 6 col 5 : op_call
> }
codeBlock->expressionRangeForBytecodeIndex() for bitxor, bitand and bitor all return a range that reads "bar"
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191030/45e569ab/attachment.htm>
More information about the webkit-unassigned
mailing list