summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-04-03 17:46:30 +0200
committerAndy Wingo <wingo@pobox.com>2017-04-03 17:47:49 +0200
commit39339c9fb93e73483cb2dce0098aeb4fc3fc5643 (patch)
tree53768bb9b5f483f8863235edc0ae43cf11d8464e
parentcee0e3f966aad6d6275dc248d6028ecebdb2dae9 (diff)
downloadguile-39339c9fb93e73483cb2dce0098aeb4fc3fc5643.tar.gz
Speed up procedure-minimum-arity for fixed arity
* libguile/programs.c (try_parse_arity): Add a case for assert-nargs-ee/locals.
-rw-r--r--libguile/programs.c8
1 files changed, 7 insertions, 1 deletions
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;