Hi,

Indeed, machine operations are not allowed before SimplifiedLowering (with
some exceptions, which usually require using
EnterMachineGraph/ExitMachineGraph).

Given the lowering that you're showing, I would suggest to move it to
machine-lowering-reducer-inl.h in Turboshaft, or maybe just do
on-the-fly in the Turbofan->Turboshaft translation (in
turboshaft/graph-builder.cc) so that you don't even need to define the
Turboshaft operation.

Cheers,
Darius


On Tue, 18 Jun 2024 at 03:50, snek <[email protected]> wrote:

> Hiya, I'm trying to write a reducer that looks something like this:
>
> Reduction JSCallReducer::ReduceGetContinuationPreservedEmbedderData(Node*
> node) {
>   JSCallNode n(node);
>   Effect effect = n.effect();
>   Control control = n.control();
>
>   Node* data = effect = graph()->NewNode(
>       jsgraph()->machine()->Load(MachineType::AnyTagged()),
>       jsgraph()->ExternalConstant(
>
> ExternalReference::continuation_preserved_embedder_data(isolate())),
>       jsgraph()->IntPtrConstant(0), effect, control);
>
>   ReplaceWithValue(node, data, effect, control);
>   return Replace(node);
> }
>
> But I'm getting assertion failures like this:
>
> # Fatal error in ../../src/compiler/representation-change.cc, line 165
> # Debug check failed: !output_type.IsNone() implies
> !output_type.Is(Type::Machine()).
>
> It seems like machine ops like Load are not really supposed to be used
> this soon in the compiler pipeline, so I'm curious what the "right way" to
> go about doing this is.
>
> --
> --
> 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 on the web visit
> https://groups.google.com/d/msgid/v8-dev/2b7d1a4b-349a-4ea9-ae1c-00a644f64347n%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/2b7d1a4b-349a-4ea9-ae1c-00a644f64347n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
Darius Mercadier

Software Engineer

[email protected]

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 on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAKRYUpvTq15hOK62kjvcgr61fcZygh%2BN3Y8s9RMG%2BRjX3buRhg%40mail.gmail.com.

Reply via email to