Hipe question

Happi happi@REDACTED
Wed Sep 26 23:16:54 CEST 2001

The hipe:c interface is for interactive mode and for debuging and testing.
There is another way to compile to native code:
The ordinary compiler supports a flag: native to produce native-code.
In the Erlang shell you can do:
 c(mod, [native]).
 c(mod, [native, {hipe,[o3,verbose]).
>From the unix shell you can do:
 erlc +native mod.erl

In both cases a .beam file containing native code will be produced.
Whenever this module is loaded the native code will be loaded instead of
beam code ( as long as the machine you are running on still has the same
architecture as the one you compiled on.)

Now, there is one slight problem ;)
This is only implemented for the SPARC in the current OTP snapshot.

However there is a new HiPE/OTP snapshot at
which also supports this on the x86.

----- Original Message -----
From: "Mickael Remond" <mickael.remond@REDACTED>

> Hello,
> I now managed to compile Hipe on Linux (Debian "Sid") thanks to the
> brand new prerelease.
> I also manage to compile a module using the hipe:c/1 function.
> But, from what I understand, I need to use this function (=> hipe
> recompilation) for each new Erlang session, as no new file is created
> and the beam file does not seem to be modified.
> I did not see any way to make the Hipe compilation permanent.
> I try to use the hipe:compile function to get the code back from the
> function, but I did not figure out what to do with it (Writing it as a
> beam or as an executable file does not work).
> I am probably missing something.
> Any clue ?
> --
> Mickaël Rémond
> http://www.erlang-fr.org/

More information about the erlang-questions mailing list