From 39339c9fb93e73483cb2dce0098aeb4fc3fc5643 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 3 Apr 2017 17:46:30 +0200 Subject: [PATCH] Speed up procedure-minimum-arity for fixed arity * libguile/programs.c (try_parse_arity): Add a case for assert-nargs-ee/locals. --- libguile/programs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libguile/programs.c b/libguile/programs.c index ba8e8546b..237d282ec 100644 --- a/libguile/programs.c +++ b/libguile/programs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014, 2017 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -251,6 +251,12 @@ try_parse_arity (SCM program, int *req, int *opt, int *rest) *opt = 0; *rest = 0; return 1; + case scm_op_assert_nargs_ee_locals: + slots = (code[0] >> 8) & 0xfff; + *req = slots - 1; + *opt = 0; + *rest = 0; + return 1; case scm_op_assert_nargs_le: slots = code[0] >> 8; *req = 0;