[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/01: Speed up procedure-minimum-arity for fixed arity
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/01: Speed up procedure-minimum-arity for fixed arity |
Date: |
Mon, 3 Apr 2017 11:48:32 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 39339c9fb93e73483cb2dce0098aeb4fc3fc5643
Author: Andy Wingo <address@hidden>
Date: Mon Apr 3 17:46:30 2017 +0200
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 ba8e854..237d282 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;