[erlang-questions] How erlang compiler transform generic instructions to specific instructions?
Björn-Egil Dahlberg
egil@REDACTED
Mon Nov 21 14:48:28 CET 2011
On 2011-11-21 08:54, Jovi Zhang wrote:
> 2011/11/21 Jovi Zhang<bookjovi@REDACTED>:
>> 2011/11/20 Björn-Egil Dahlberg<wallentin.dahlberg@REDACTED>:
>>> I guess you mean the beam loader. The loader will transform beam-code to
>>> internal beam code, or "load-assembler" or what you may call it.
>> Yes, that's what I means, I always got confused by this part.
>> "beam loader" is a part of emulator?, not compiler?
>> *.beam file just include generic instruction? beam emulator erl load
>> that generic instructions, then transform it?
>>
>>> No documentation exists.
>> Not open source? which module handle this part?
> Hmm, Thanks for reply, I got answer now, the opcode transform
> functionality is located in load_code->transform_engine.
Correct. The transformations to internal beam-code is done via
transform_engine. Transform engine is in itself is a virtual machine
(according to björn .. the de facto documentation).
The specific transformation rules are stored in beam/ops.tab. Most of
them are simple rewrites of function names. The documentation is in the
code. =)
// Björn-Egil
More information about the erlang-questions
mailing list