[erlang-questions] Question about the VM

Anthony Ramine n.oxyde@REDACTED
Thu Sep 25 11:07:57 CEST 2014


What do you call native loops? Are you planning to generate BEAM code that loops using plain jump instructions? What do you do in that loop? Can you be sure your process will still yield in a cooperative fashion to not hang the VM? Did you measure that you actually need such a thing? Did you check that you will still be able to feed that assembly to the erlc compiler to benefit from the other usual instructions? In the end couldn't you just use HiPE to take care of these loops?

Regards,

-- 
Anthony Ramine

> Le 24 sept. 2014 à 23:36, Samuel Barney <samjbarney@REDACTED> a écrit :
> 
> I did look at targeting Core Erlang first, but it doesn't allow for native loops. I could emulate them with function calls, however, if I move down to the assembly level I can build loops with what is provided there.
> 
> Thank you for the information, I'll do some more searching to see what I can find.
> 
> Respectfully,
> Samuel Barney
> 
>> On Wed, Sep 24, 2014 at 4:40 AM, Anthony Ramine <n.oxyde@REDACTED> wrote:
>> Did you try targeting Core Erlang first? Which primitives do you want to access in BEAM?
>> 
>> There are 1024 X registers, and Y registers are used for locals in functions, to save them when calling other functions.
>> 
>> You can find such information by reading the source code or various talk slides made by the OTP team these last years, but I can't help you find the links right now.
>> 
>> Regards,
>> 
>> Le 24 sept. 2014 à 04:40, Samuel Barney <samjbarney@REDACTED> a écrit :
>> 
>> > I'm developing a language on top of the Erlang VM, and there are a couple of flow-control constructs that I can't implement without skipping the Erlang AST and using the erlang assembly code.
>> >
>> > Is there a specific amount of X and Y registers? Or is there a way that I can find that out via Erlang?
>> >
>> > Also, what is the purpose of the Y registers?
>> > _______________________________________________
>> > erlang-questions mailing list
>> > erlang-questions@REDACTED
>> > http://erlang.org/mailman/listinfo/erlang-questions
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140925/6d22415c/attachment.htm>


More information about the erlang-questions mailing list