On Mon, Sep 28, 2015 at 7:59 AM, Sylvain G <[email protected]> wrote:
> Hi,
>
> I'm trying to modify V8's Crankshaft for a research project.
>
> So far I'm duplicating some parts of code at the Hydrogen level (mostly
> loops), and modifying them with different optimizations than the usual
> Crankshaft is doing. I still need the original version of the code as a
> fallback in case something goes wrong (don't want to deoptimize everytime my
> modifications fail).
>
> My basic idea was to save/overwrite the right stackframe to restore the
> state after taking the modified branch. It doesn't work because because the
> newly created variables in the duplicated code do not correspond with the
> original ones.
>
> So here is my question: My modifications are sparse so I can handle them
> manually, but how to automatically match all the other variables?
> how can I ensure that both branches in the CFG (my version and the original)
> use the same stack slots and same registers for the corresponding variables?
>
> Or is there a better way to do this kind of thing at all?
>
> Any explanation/suggestion would be very welcome.
> Thanks,
> Sylvain

I think that's going to be hard.  If I understand your question right,
you are essentially asking "how can I make two different programs do
the same thing?"

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to