Exactly, as Marja said, "ExtraWide" is a separate bytecode that puts the
interpreter into "ExtraWide" mode for the next dispatch (by changing the
dispatch table). Then, each IGNITION_HANDLER defined bytecode has a Wide
and ExtraWide equivalent, which are all generated from the same source; the
LdaSmi you linked below is generated three times,
with BytecodeOperandImmSmi behaving differently for each generation (as
controlled by "operand_scale()" in
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/interpreter/interpreter-assembler.cc;l=593;drc=0dc30698370bcde67dda4f48b7ca19bf4c1dbc17
)

On Fri, May 30, 2025 at 1:31 PM Marja Hölttä <[email protected]> wrote:

> Some pointers:
>
> By searching for "ExtraWide" in code search you can see e.g., this test
> code snippet:
>
>
> https://source.chromium.org/chromium/chromium/src/+/main:v8/test/unittests/interpreter/bytecode-decoder-unittest.cc;l=32?q=extrawide&ss=chromium%2Fchromium%2Fsrc
>
> which tells us how the ExtraWide is used.
>
> The handler for ExtraWide is:
>
>
> https://source.chromium.org/chromium/chromium/src/+/main:v8/src/interpreter/interpreter-generator.cc;l=3308
>
> I hope this helps.
>
>
>
> On Fri, May 30, 2025 at 1:05 PM yahan lu <[email protected]> wrote:
>
>> Hi all~
>>
>> I'm studying the builtin::LdaSmiExtraWideHandler and want to understand
>> its implementation. However, I can only find source code for the standard
>> LdaSmi handler:
>> // LdaSmi <imm> // // Load an integer literal into the accumulator as a
>> Smi. IGNITION_HANDLER(LdaSmi, InterpreterAssembler) { TNode<Smi> smi_int
>> = BytecodeOperandImmSmi(0); SetAccumulator(smi_int); Dispatch(); }
>>
>> *Where should I look for the LdaSmiExtraWideHandler implementation?*
>>
>> --
>> --
>> v8-dev mailing list
>> [email protected]
>> http://groups.google.com/group/v8-dev
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "v8-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion visit
>> https://groups.google.com/d/msgid/v8-dev/27637c18-ef7f-46d5-8b21-229a15608c49n%40googlegroups.com
>> <https://groups.google.com/d/msgid/v8-dev/27637c18-ef7f-46d5-8b21-229a15608c49n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
>
>
> Google Germany GmbH
>
> Erika-Mann-Straße 33
>
> 80636 München
>
> Geschäftsführer: Paul Manicle, Liana Sebastian.
>
> Registergericht und -nummer: Hamburg, HRB 86891
>
> Sitz der Gesellschaft: Hamburg
>
> Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten
> haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter,
> löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen,
> dass die E-Mail an die falsche Person gesendet wurde.
>
>
>
> This e-mail is confidential. If you received this communication by
> mistake, please don't forward it to anyone else, please erase all copies
> and attachments, and please let me know that it has gone to the wrong
> person.
>
> --
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/v8-dev/CAED6dUAzD2Hq5adX1SsAMCC89R93ktKYqWLWQ2-MCwNB0iQw8Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/v8-dev/CAED6dUAzD2Hq5adX1SsAMCC89R93ktKYqWLWQ2-MCwNB0iQw8Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/v8-dev/CAGxd1t_cfnfjz21oYgVtqPTx1%2BQU5Re8TpdF9HAaxpmMOuSzDw%40mail.gmail.com.

Reply via email to