Support maps in cover
erts: Fix Map cmp exact equal of an empty map

The expression,

  #{} =:= M

where M was any Map, would always result in 'true'.

This commit fixes this issue by first comparing sizes for
both terms and then checking for size zero.
hipe: Break apart hipe_bif:make_fe/3 into two BIFs

This commit is a preparation for eliminating a race condition
loading the native code for modules whose BEAM code has already
been loaded. Here we introduce two new BIFs so that looking up
a fun entry is separate from setting the native address in the
fun entry.
Delay patching of closures to eliminate a race condition

The loader of native code tries to avoid race condition by bringing
down the system to a single scheduler. Unfortunately, that will not
completely avoid race conditions beacuse other processes may still
run while the code is being loaded. Therefore, we must still make
sure that native code has been fully fixed up before it can be
executed.

Under unlucky circumstances, it was possible for the global name
register process to call a fun in native code before the native
code for the fun had been fully fixed up. The run-time system
would crash when running the not-fully-fixed-up code.

Here is a way to make the bug 100% reproducible. First add this
function to the 'global' module:

silly_looper(List) ->
    lists:foreach(fun(E) -> put(any_atom, E) end, List),
    silly_looper(List).

Then insert the following code at the beginning of the init/1
function in the 'global' module:

    spawn_link(fun() -> silly_looper(lists:seq(1, 100)) end),

The run-time system will crash during start up when the native
code for the 'global' module is being loaded. What will happen
is that lists:foreach/2 (which runs in native code) will call
the native code for the fun in silly_looper/1 before the reference
to 'any_atom' has been changed from a 0 to the proper tagged
atom value. The put/2 BIF will exit when attempting to calculate
the hash value for the illegal value 0 (it is not properly tagged).

To eliminate this race condition, we must delay patching the
native code addresses for a fun into the fun entry until the native
code has been fully fixed up. We will use the new BIFs introduced
in the previous commit.

While we are at it, we will also make sure that we erase any
temporary variables in the process dictionary used by the
hipe_unified_loader module.
compiler: Fix error message printout on compile error

Use correct stack in printout.
Fix expansion of map update arguments

Reported-by: José Valim
Do not emit blatantly illformed Core Erlang apply expressions

(fun f/1)() should be compiled to let X = 'f'/1 in apply X () to let the compiler
properly generate code that will fail with badarity at runtime.

Reported-by: Ulf Norell
Do not mark all calls to erlang:is_record/3 as safe

Calls to erlang:is_record/3 where the second and third arguments are not
respectively a literal atom and a literal integer can't be transformed to guards
and thus are not safe.

Reported-by: Ulf Norell
Fix a qlc bug where filters were erroneously optimized away

Thanks to Sam Bobroff for reporting the bug.
Merge branch 'egil/fix-compiler-error-msg'

* egil/fix-compiler-error-msg:
  compiler: Fix error message printout on compile error
Merge branch 'egil/fix-maps-eq'

* egil/fix-maps-eq:
  erts: Fix Map cmp exact equal of an empty map
ssl: Improved documentation of the cacertfile option
Merge branch 'ia/ssl/doc-imp/OTP-11759'

* ia/ssl/doc-imp/OTP-11759:
  ssl: Improved documentation of the cacertfile option
Properly collect labels in put_map instructions in beam_bool

Reported-by: Ulf Norell
ssl: Add input sanity check

Avoid puzzling behavior due to options being disregarded if they
are not key value tuples.
Merge branch 'ia/ssl/proplist-input-check/OTP-11760'

* ia/ssl/proplist-input-check/OTP-11760:
  ssl: Add input sanity check
Merge branch 'hb/stdlib/qlc_fix/OTP-11758'

* hb/stdlib/qlc_fix/OTP-11758:
  Fix a qlc bug where filters were erroneously optimized away
Merge branch 'bjorn/hipe/fix-race-condition'

* bjorn/hipe/fix-race-condition:
  Delay patching of closures to eliminate a race condition
  hipe: Break apart hipe_bif:make_fe/3 into two BIFs
Merge branch 'nox/compiler/sys_core_fold-erlang-is_record-3'

* nox/compiler/sys_core_fold-erlang-is_record-3:
  Do not mark all calls to erlang:is_record/3 as safe
Merge branch 'nox/compiler/v3_core-mismatched-apply'

* nox/compiler/v3_core-mismatched-apply:
  Do not emit blatantly illformed Core Erlang apply expressions