From c48e315dbc8e41217ef51501afef30d02b7690ce Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Wed, 12 May 2010 09:49:12 +0200 Subject: First prototype for local functions overriding autoimported Import directives still not sorted out! --- erts/preloaded/src/erlang.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/preloaded') diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl index 1edb5e72db..adee8795b2 100644 --- a/erts/preloaded/src/erlang.erl +++ b/erts/preloaded/src/erlang.erl @@ -55,10 +55,10 @@ %%-------------------------------------------------------------------------- apply(Fun, Args) -> - apply(Fun, Args). + erlang:apply(Fun, Args). apply(Mod, Name, Args) -> - apply(Mod, Name, Args). + erlang:apply(Mod, Name, Args). %% Spawns with a fun -- cgit v1.2.3 From 334e4acd61605111712edefe874f98d030f0d25c Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Tue, 1 Jun 2010 11:12:14 +0200 Subject: Change warning to error for nowarn_bif_clash compiler directive --- erts/preloaded/src/erlang.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'erts/preloaded') diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl index adee8795b2..935c2de253 100644 --- a/erts/preloaded/src/erlang.erl +++ b/erts/preloaded/src/erlang.erl @@ -44,7 +44,14 @@ -deprecated([hash/2]). -deprecated([concat_binary/1]). --compile(nowarn_bif_clash). +% Get rid of autoimports of spawn to avoid clashes with ourselves. +-compile({no_auto_import,[spawn/1]}). +-compile({no_auto_import,[spawn/4]}). +-compile({no_auto_import,[spawn_link/1]}). +-compile({no_auto_import,[spawn_link/4]}). +-compile({no_auto_import,[spawn_opt/2]}). +-compile({no_auto_import,[spawn_opt/4]}). +-compile({no_auto_import,[spawn_opt/5]}). %%-------------------------------------------------------------------------- -- cgit v1.2.3 From 1b8f86d8314389bf6033d23d3e6d707514ba7612 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Wed, 2 Jun 2010 15:22:19 +0200 Subject: Remove (harmless) warnings about min/max in core applications --- erts/preloaded/src/erl_prim_loader.erl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'erts/preloaded') diff --git a/erts/preloaded/src/erl_prim_loader.erl b/erts/preloaded/src/erl_prim_loader.erl index a13292d5ab..024b20eadb 100644 --- a/erts/preloaded/src/erl_prim_loader.erl +++ b/erts/preloaded/src/erl_prim_loader.erl @@ -405,7 +405,7 @@ handle_timeout(State = #state{loader = inet}, Parent) -> efile_multi_get_file_from_port(State, ModFiles, Paths, Fun) -> Ref = make_ref(), %% More than 200 processes is no gain. - Max = min(200, erlang:system_info(thread_pool_size)), + Max = erlang:min(200, erlang:system_info(thread_pool_size)), efile_multi_get_file_from_port2(ModFiles, 0, Max, State, Paths, Fun, Ref, ok). efile_multi_get_file_from_port2([MF | MFs], Out, Max, State, Paths, Fun, Ref, Ret) when Out < Max -> @@ -1189,9 +1189,6 @@ keyins(X, I, [Y | T]) when X < element(I,Y) -> [X,Y|T]; keyins(X, I, [Y | T]) -> [Y | keyins(X, I, T)]; keyins(X, _I, []) -> [X]. -min(X, Y) when X < Y -> X; -min(_X, Y) -> Y. - to_strs([P|Paths]) when is_atom(P) -> [atom_to_list(P)|to_strs(Paths)]; to_strs([P|Paths]) when is_list(P) -> -- cgit v1.2.3 From ad8eef21ca9b8354fa4e32f799b6870dfbd35afb Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Wed, 2 Jun 2010 16:55:50 +0200 Subject: Update preloaded modules --- erts/preloaded/ebin/erl_prim_loader.beam | Bin 50708 -> 50384 bytes erts/preloaded/ebin/erlang.beam | Bin 23788 -> 24320 bytes erts/preloaded/ebin/init.beam | Bin 44352 -> 44352 bytes erts/preloaded/ebin/otp_ring0.beam | Bin 1420 -> 1432 bytes erts/preloaded/ebin/prim_file.beam | Bin 30472 -> 30452 bytes erts/preloaded/ebin/prim_inet.beam | Bin 57288 -> 57268 bytes erts/preloaded/ebin/prim_zip.beam | Bin 22432 -> 22432 bytes erts/preloaded/ebin/zlib.beam | Bin 10596 -> 10616 bytes 8 files changed, 0 insertions(+), 0 deletions(-) (limited to 'erts/preloaded') diff --git a/erts/preloaded/ebin/erl_prim_loader.beam b/erts/preloaded/ebin/erl_prim_loader.beam index fe3cee1c56..0d2be9e1ea 100644 Binary files a/erts/preloaded/ebin/erl_prim_loader.beam and b/erts/preloaded/ebin/erl_prim_loader.beam differ diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam index 5a4c5e9d1e..a33a570891 100644 Binary files a/erts/preloaded/ebin/erlang.beam and b/erts/preloaded/ebin/erlang.beam differ diff --git a/erts/preloaded/ebin/init.beam b/erts/preloaded/ebin/init.beam index cfe2c36cee..2cb7d3bd25 100644 Binary files a/erts/preloaded/ebin/init.beam and b/erts/preloaded/ebin/init.beam differ diff --git a/erts/preloaded/ebin/otp_ring0.beam b/erts/preloaded/ebin/otp_ring0.beam index 74587de26b..4c1e8aa63f 100644 Binary files a/erts/preloaded/ebin/otp_ring0.beam and b/erts/preloaded/ebin/otp_ring0.beam differ diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam index c6610b71e6..d39d2d1135 100644 Binary files a/erts/preloaded/ebin/prim_file.beam and b/erts/preloaded/ebin/prim_file.beam differ diff --git a/erts/preloaded/ebin/prim_inet.beam b/erts/preloaded/ebin/prim_inet.beam index 8d19923281..52d1d9215f 100644 Binary files a/erts/preloaded/ebin/prim_inet.beam and b/erts/preloaded/ebin/prim_inet.beam differ diff --git a/erts/preloaded/ebin/prim_zip.beam b/erts/preloaded/ebin/prim_zip.beam index cd41f36413..d31de6cfd3 100644 Binary files a/erts/preloaded/ebin/prim_zip.beam and b/erts/preloaded/ebin/prim_zip.beam differ diff --git a/erts/preloaded/ebin/zlib.beam b/erts/preloaded/ebin/zlib.beam index ce1163d260..ac4537662b 100644 Binary files a/erts/preloaded/ebin/zlib.beam and b/erts/preloaded/ebin/zlib.beam differ -- cgit v1.2.3