From 7f3a057a179af274f24667ecbb7b8f3d40b667b6 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Mon, 25 May 2015 21:22:46 +0100 Subject: Change hipe_bifs:system_crc/1 to hipe_bifs:system_crc/0 The macro HIPE_SYSTEM_CRC used to contain a hidden cookie from the VM that generated hipe_literals.hrl. This means that BEAM files containing that macro would be tied to a particular version of the VM. Change hipe_bifs:system_crc such that it doesn't require a hidden cookie to return the desired value. --- erts/emulator/hipe/hipe_bif0.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'erts/emulator/hipe/hipe_bif0.c') diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c index 099f4f90de..a4311d22e2 100644 --- a/erts/emulator/hipe/hipe_bif0.c +++ b/erts/emulator/hipe/hipe_bif0.c @@ -1745,13 +1745,11 @@ BIF_RETTYPE hipe_bifs_check_crc_1(BIF_ALIST_1) BIF_RET(am_false); } -BIF_RETTYPE hipe_bifs_system_crc_1(BIF_ALIST_1) +BIF_RETTYPE hipe_bifs_system_crc_0(BIF_ALIST_0) { Uint crc; - if (!term_to_Uint(BIF_ARG_1, &crc)) - BIF_ERROR(BIF_P, BADARG); - crc ^= (HIPE_SYSTEM_CRC ^ HIPE_LITERALS_CRC); + crc = HIPE_SYSTEM_CRC; BIF_RET(Uint_to_term(crc, BIF_P)); } -- cgit v1.2.3