diff options
author | Björn Gustavsson <[email protected]> | 2015-02-18 09:56:45 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-02-18 09:56:45 +0100 |
commit | 3dd2608a5dae7f054af9a5a3bf76befb00f38b98 (patch) | |
tree | e400b92905d2fc826308544f07ec182e538be3a8 /lib/compiler/src/v3_kernel.erl | |
parent | 36a515e52d89a6a5f87c271bdea794394ca35d27 (diff) | |
parent | 116e8aa05f84ee66aead2792b07b644c7f3e8fcd (diff) | |
download | otp-3dd2608a5dae7f054af9a5a3bf76befb00f38b98.tar.gz otp-3dd2608a5dae7f054af9a5a3bf76befb00f38b98.tar.bz2 otp-3dd2608a5dae7f054af9a5a3bf76befb00f38b98.zip |
Merge branch 'bjorn/compiler/clean-up/OTP-12497'
* bjorn/compiler/clean-up/OTP-12497:
cerl: Teach is_literal_term/1 to handle maps
cerl: Add missing is_c_map/1 function
v3_core: Simplify translation of maps
sys_core_fold: Simplify opt_simple_let_2/6
Break out inlining of 'lists' functions to a new module
sys_core_fold: Add is_int_type/2 and is_tuple_type/2
sys_core_fold: Refactor type information access
core_lib: Deprecate functions that are no longer used by the compiler
Eliminate use of core_lib:literal_value/1
Eliminate all uses of core_lib:get_anno/1 and core_lib:set_anno/2
core_lint: Eliminate call to core_lib:is_literal/1
test_lib: Include test_server.hrl using -include_lib
sys_core_fold: Rename add_scope/2 to fit in the sub_* family
v3_core: Suppress compiler-generated calls in guards
v3_core: Remove out-commented code
v3_core: Remove unused function argument for bc_tq()
v3_core: Use Core Erlang annotations in a type-safe way
Diffstat (limited to 'lib/compiler/src/v3_kernel.erl')
-rw-r--r-- | lib/compiler/src/v3_kernel.erl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/compiler/src/v3_kernel.erl b/lib/compiler/src/v3_kernel.erl index 72e7a39333..08e84efc1b 100644 --- a/lib/compiler/src/v3_kernel.erl +++ b/lib/compiler/src/v3_kernel.erl @@ -131,12 +131,12 @@ module(#c_module{anno=A,name=M,exports=Es,attrs=As,defs=Fs}, _Options) -> {ok,#k_mdef{anno=A,name=M#c_literal.val,exports=Kes,attributes=Kas, body=Kfs ++ St#kern.funs},lists:sort(St#kern.ws)}. -attributes([{#c_literal{val=Name},Val}|As]) -> +attributes([{#c_literal{val=Name},#c_literal{val=Val}}|As]) -> case include_attribute(Name) of false -> attributes(As); true -> - [{Name,core_lib:literal_value(Val)}|attributes(As)] + [{Name,Val}|attributes(As)] end; attributes([]) -> []. @@ -675,12 +675,12 @@ atomic_bin([#c_bitstr{anno=A,val=E0,size=S0,unit=U0,type=T,flags=Fs0}|Es0], {E,Ap1,St1} = atomic(E0, Sub, St0), {S1,Ap2,St2} = atomic(S0, Sub, St1), validate_bin_element_size(S1), - U1 = core_lib:literal_value(U0), - Fs1 = core_lib:literal_value(Fs0), + U1 = cerl:concrete(U0), + Fs1 = cerl:concrete(Fs0), {Es,Ap3,St3} = atomic_bin(Es0, Sub, St2), {#k_bin_seg{anno=A,size=S1, unit=U1, - type=core_lib:literal_value(T), + type=cerl:concrete(T), flags=Fs1, seg=E,next=Es}, Ap1++Ap2++Ap3,St3}; @@ -807,8 +807,8 @@ pattern_bin_1([#c_bitstr{anno=A,val=E0,size=S0,unit=U,type=T,flags=Fs}|Es0], %% problems. #k_atom{val=bad_size} end, - U0 = core_lib:literal_value(U), - Fs0 = core_lib:literal_value(Fs), + U0 = cerl:concrete(U), + Fs0 = cerl:concrete(Fs), %%ok= io:fwrite("~w: ~p~n", [?LINE,{B0,S,U0,Fs0}]), {E,Osub1,St2} = pattern(E0, Isub0, Osub0, St1), Isub1 = case E0 of @@ -819,7 +819,7 @@ pattern_bin_1([#c_bitstr{anno=A,val=E0,size=S0,unit=U,type=T,flags=Fs}|Es0], {Es,{Isub,Osub},St3} = pattern_bin_1(Es0, Isub1, Osub1, St2), {#k_bin_seg{anno=A,size=S, unit=U0, - type=core_lib:literal_value(T), + type=cerl:concrete(T), flags=Fs0, seg=E,next=Es}, {Isub,Osub},St3}; |