diff options
author | Björn-Egil Dahlberg <[email protected]> | 2014-03-31 10:37:01 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-03-31 10:37:01 +0200 |
commit | 07eee76fa86019a922784099403ad3d9f0d958eb (patch) | |
tree | 48d973bd36b4825ab9f4c7c9e3178d85483953d8 /lib/compiler | |
parent | 8dfd01213a764ca23b1bcadf367429113030805e (diff) | |
parent | 918f0a26da2ad559bb674e19fce952c2564b9b45 (diff) | |
download | otp-07eee76fa86019a922784099403ad3d9f0d958eb.tar.gz otp-07eee76fa86019a922784099403ad3d9f0d958eb.tar.bz2 otp-07eee76fa86019a922784099403ad3d9f0d958eb.zip |
Merge branch 'ks/hipe-is_map-support/OTP-11831'
* ks/hipe-is_map-support/OTP-11831:
Reinstate native code compilation of cerl and erl_types
Take out no_native compiler attribute
Add support for the compilation of the is_map/1 guard to native code
Add 'map' to the set of icode_type_test()s
Support the translation of the is_map BEAM instruction to Icode
Diffstat (limited to 'lib/compiler')
-rw-r--r-- | lib/compiler/src/beam_disasm.erl | 9 | ||||
-rw-r--r-- | lib/compiler/src/cerl.erl | 4 |
2 files changed, 3 insertions, 10 deletions
diff --git a/lib/compiler/src/beam_disasm.erl b/lib/compiler/src/beam_disasm.erl index 4bdfe4e0c2..c45596f236 100644 --- a/lib/compiler/src/beam_disasm.erl +++ b/lib/compiler/src/beam_disasm.erl @@ -1030,6 +1030,7 @@ resolve_inst({gc_bif2,Args},Imports,_,_) -> [F,Live,Bif,A1,A2,Reg] = resolve_args(Args), {extfunc,_Mod,BifName,_Arity} = lookup(Bif+1,Imports), {gc_bif,BifName,F,Live,[A1,A2],Reg}; + %% %% New instruction in R14, gc_bif with 3 arguments %% @@ -1146,21 +1147,17 @@ resolve_inst({put_map_assoc,Args},_,_,_) -> [FLbl,Src,Dst,{u,N},{{z,1},{u,_Len},List0}] = Args, List = resolve_args(List0), {put_map_assoc,FLbl,Src,Dst,N,{list,List}}; - resolve_inst({put_map_exact,Args},_,_,_) -> [FLbl,Src,Dst,{u,N},{{z,1},{u,_Len},List0}] = Args, List = resolve_args(List0), {put_map_exact,FLbl,Src,Dst,N,{list,List}}; - -resolve_inst({is_map,Args0},_,_,_) -> +resolve_inst({is_map=I,Args0},_,_,_) -> [FLbl|Args] = resolve_args(Args0), - {test, is_map, FLbl, Args}; - + {test,I,FLbl,Args}; resolve_inst({has_map_fields,Args0},_,_,_) -> [FLbl,Src,{{z,1},{u,_Len},List0}] = Args0, List = resolve_args(List0), {test,has_map_fields,FLbl,Src,{list,List}}; - resolve_inst({get_map_elements,Args0},_,_,_) -> [FLbl,Src,{{z,1},{u,_Len},List0}] = Args0, List = resolve_args(List0), diff --git a/lib/compiler/src/cerl.erl b/lib/compiler/src/cerl.erl index e400e4f185..ed11c8de4d 100644 --- a/lib/compiler/src/cerl.erl +++ b/lib/compiler/src/cerl.erl @@ -136,10 +136,6 @@ c_literal/0, c_map_pair/0, c_module/0, c_tuple/0, c_values/0, c_var/0, cerl/0, var_name/0]). -%% HiPE does not understand Maps -%% (guard functions is_map/1 and map_size/1 in ann_c_map/3) --compile(no_native). - -include("core_parse.hrl"). -type c_alias() :: #c_alias{}. |