From 5b8609d544911b60a1c384b11d96c147128a848d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 18 Jan 2011 16:45:50 +0100 Subject: Lower the maximum arity from 256 to 255 Historically, for no good reason, a function is allowed to have from 0 to 256 arguments. Thus, the number of arguments *almost* fits into a byte. HiPE only supports up to 255 arguments (because it assumes that the function arity fits into a single byte), and fixing that limitation would require ugly special-case handling. In Dialyzer, the arity type is defined to be a byte (i.e. 0..255). Since no-one uses functions with 256 arguments anyway, lower the limit to 255. --- erts/emulator/beam/erl_vm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/emulator/beam/erl_vm.h') diff --git a/erts/emulator/beam/erl_vm.h b/erts/emulator/beam/erl_vm.h index 48fa99934e..5b42a2ce11 100644 --- a/erts/emulator/beam/erl_vm.h +++ b/erts/emulator/beam/erl_vm.h @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 1996-2010. All Rights Reserved. + * Copyright Ericsson AB 1996-2011. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -47,7 +47,7 @@ #define SEQ_TRACE 1 #define CONTEXT_REDS 2000 /* Swap process out after this number */ -#define MAX_ARG 256 /* Max number of arguments allowed */ +#define MAX_ARG 255 /* Max number of arguments allowed */ #define MAX_REG 1024 /* Max number of x(N) registers used */ /* Scheduler stores data for temporary heaps if -- cgit v1.2.3