diff options
author | Andy Wingo <wingo@pobox.com> | 2013-10-27 09:52:39 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-10-27 09:52:39 +0100 |
commit | 0720f70ed7e9de2685409abfe4e2c0dd01f81b74 (patch) | |
tree | 695650decf699cbb5b544fd9dec881adcfe56e47 /libguile/validate.h | |
parent | c450b47723438ad9e517b02a45b577b7f7fd848b (diff) | |
download | guile-0720f70ed7e9de2685409abfe4e2c0dd01f81b74.tar.gz |
Memoized expressions are pairs, not SMOBs
* libguile/memoize.c (MAKMEMO): Memoized objects are pairs now, not
SMOBs. This lets eval.scm destructure them more efficiently.
(scm_print_memoized, scm_memoized_p, scm_memoized_expression_typecode)
(scm_memoized_expression_data): Remove these interfaces.
(unmemoize, scm_memoize_variable_access_x): Remove SMOB type checks.
(scm_init_memoize): Remove SMOB type definition.
* libguile/memoize.h (scm_tc16_memoized, SCM_MEMOIZED_P)
(scm_memoized_expression_typecode, scm_memoized_expression_data)
(scm_memoized_p): Remove declarations.
* libguile/validate.h (SCM_VALIDATE_MEMOIZED): Remove declaration.
* libguile/eval.c (eval): Remove memoized type check, and inline the
inum unpacking.
* module/ice-9/eval.scm (memoized-expression-case): Use car and cdr to
destructure memoized expressions. A big win!
Diffstat (limited to 'libguile/validate.h')
-rw-r--r-- | libguile/validate.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libguile/validate.h b/libguile/validate.h index b4d544151..68ff3744d 100644 --- a/libguile/validate.h +++ b/libguile/validate.h @@ -4,7 +4,7 @@ #define SCM_VALIDATE_H /* Copyright (C) 1999, 2000, 2001, 2002, 2004, 2006, 2007, 2009, - * 2011, 2012 Free Software Foundation, Inc. + * 2011, 2012, 2013 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 @@ -293,8 +293,6 @@ #define SCM_VALIDATE_VARIABLE(pos, var) SCM_MAKE_VALIDATE_MSG (pos, var, VARIABLEP, "variable") -#define SCM_VALIDATE_MEMOIZED(pos, obj) SCM_MAKE_VALIDATE_MSG (pos, obj, MEMOIZED_P, "memoized code") - #define SCM_VALIDATE_PROC(pos, proc) \ do { \ SCM_ASSERT (scm_is_true (scm_procedure_p (proc)), proc, pos, FUNC_NAME); \ |