public
Description: Reia is a Ruby/Python-like language for BEAM, the Erlang VM
Homepage: http://reia-lang.org
Clone URL: git://github.com/tarcieri/reia.git
Programatically determine availability of HiPE
Tony Arcieri (author)
Fri Aug 22 14:25:21 -0700 2008
commit  7532f4c4e9b93abec4ef9ca6208fdaa81970c69d
tree    a6f4612d41bbace1c40ab1fbfb349f39bf2dc6d3
parent  760b17b5f3fe4d24a02a6aa15642da69dca3bd54
...
6
7
8
9
 
10
11
12
...
16
17
18
19
20
 
 
 
 
 
 
 
21
...
6
7
8
 
9
10
11
12
...
16
17
18
 
19
20
21
22
23
24
25
26
27
0
@@ -6,7 +6,7 @@
0
 %
0
 
0
 -module(reia_module).
0
--export([build/1]).
0
+-export([build/1, hipe_available/0]).
0
 
0
 build({module, _Line, Name, Functions}) ->
0
   {ok, Module} = lists:foldl(
0
@@ -16,4 +16,10 @@ build({module, _Line, Name, Functions}) ->
0
   ),
0
   smerl:compile(Module);
0
 build(_) ->
0
- {error, "invalid module"}.
0
\ No newline at end of file
0
+ {error, "invalid module"}.
0
+
0
+hipe_available() ->
0
+ case string:str(erlang:system_info(system_version), "[hipe]") of
0
+ 0 -> false;
0
+ _ -> true
0
+ end.
0
\ No newline at end of file

Comments

    No one has commented yet.