mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-23 12:00:21 +02:00
Remove unused "nargs" field of memoized call expressions
* libguile/eval.c (eval): * libguile/memoize.c (MAKMEMO_CALL, memoize, unmemoize): * module/ice-9/eval.scm (primitive-eval): Remove "nargs" field from memoized call expressions, and adapt callers.
This commit is contained in:
parent
af082f9b1c
commit
eb0376567d
3 changed files with 19 additions and 18 deletions
|
@ -1,6 +1,6 @@
|
|||
;;; -*- mode: scheme; coding: utf-8; -*-
|
||||
|
||||
;;;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 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
|
||||
|
@ -87,7 +87,7 @@
|
|||
(expand-pattern v pat (let () e0 e ...) (fk))))))
|
||||
|
||||
(define-syntax expand-pattern
|
||||
(syntax-rules (_ quote unquote)
|
||||
(syntax-rules (_ quote unquote ?)
|
||||
((_ v _ kt kf) kt)
|
||||
((_ v () kt kf) (if (null? v) kt kf))
|
||||
((_ v (quote lit) kt kf)
|
||||
|
@ -99,6 +99,8 @@
|
|||
(let ((vx (car v)) (vy (cdr v)))
|
||||
(expand-pattern vx x (expand-pattern vy y kt kf) kf))
|
||||
kf))
|
||||
((_ v (? pred var) kt kf)
|
||||
(if (pred v) (let ((var v)) kt) kf))
|
||||
((_ v #f kt kf) (if (eqv? v #f) kt kf))
|
||||
((_ v var kt kf) (let ((var v)) kt))))
|
||||
|
||||
|
@ -113,7 +115,7 @@
|
|||
(lambda (env)
|
||||
(env-ref env depth width)))
|
||||
|
||||
(define (compile-call f nargs args)
|
||||
(define (compile-call f args)
|
||||
(let ((f (compile f)))
|
||||
(match args
|
||||
(() (lambda (env) ((f env))))
|
||||
|
@ -554,8 +556,8 @@
|
|||
((,(typecode lexical-ref) depth . width)
|
||||
(compile-lexical-ref depth width))
|
||||
|
||||
((,(typecode call) f nargs . args)
|
||||
(compile-call f nargs args))
|
||||
((,(typecode call) f . args)
|
||||
(compile-call f args))
|
||||
|
||||
((,(typecode box-ref) . box)
|
||||
(compile-box-ref box))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue