Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.216.68
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
guile /
3.0 /
language /
cps /
Delete
Unzip
Name
Size
Permission
Date
Action
closure-conversion.scm
37.26
KB
-rw-r--r--
2021-05-10 17:28
compile-bytecode.scm
32.1
KB
-rw-r--r--
2021-05-10 17:28
contification.scm
23.27
KB
-rw-r--r--
2021-05-10 17:28
cse.scm
32.61
KB
-rw-r--r--
2021-05-10 17:28
dce.scm
18.02
KB
-rw-r--r--
2021-05-10 17:28
devirtualize-integers.scm
11.33
KB
-rw-r--r--
2021-05-10 17:28
effects-analysis.scm
24.55
KB
-rw-r--r--
2021-05-10 17:28
elide-arity-checks.scm
4.41
KB
-rw-r--r--
2021-05-10 17:28
graphs.scm
10.16
KB
-rw-r--r--
2021-05-10 17:28
intmap.scm
28.35
KB
-rw-r--r--
2021-05-10 17:28
intset.scm
29.59
KB
-rw-r--r--
2021-05-10 17:28
licm.scm
14.7
KB
-rw-r--r--
2021-05-10 17:28
loop-instrumentation.scm
2.55
KB
-rw-r--r--
2021-05-10 17:28
optimize.scm
5.6
KB
-rw-r--r--
2021-05-10 17:28
peel-loops.scm
14.52
KB
-rw-r--r--
2021-05-10 17:28
prune-top-level-scopes.scm
2.07
KB
-rw-r--r--
2021-05-10 17:28
reify-primitives.scm
24.61
KB
-rw-r--r--
2021-05-10 17:28
renumber.scm
10.21
KB
-rw-r--r--
2021-05-10 17:28
rotate-loops.scm
10.44
KB
-rw-r--r--
2021-05-10 17:28
self-references.scm
3.06
KB
-rw-r--r--
2021-05-10 17:28
simplify.scm
10.52
KB
-rw-r--r--
2021-05-10 17:28
slot-allocation.scm
40.87
KB
-rw-r--r--
2021-05-10 17:28
spec.scm
1.83
KB
-rw-r--r--
2021-05-10 17:28
specialize-numbers.scm
43.45
KB
-rw-r--r--
2021-05-10 17:28
specialize-primcalls.scm
6.71
KB
-rw-r--r--
2021-05-10 17:28
split-rec.scm
7.56
KB
-rw-r--r--
2021-05-10 17:28
switch.scm
18.01
KB
-rw-r--r--
2021-05-10 17:28
type-checks.scm
3.07
KB
-rw-r--r--
2021-05-10 17:28
type-fold.scm
28.47
KB
-rw-r--r--
2021-05-10 17:28
types.scm
80.57
KB
-rw-r--r--
2021-05-10 17:28
utils.scm
13.68
KB
-rw-r--r--
2021-05-10 17:28
verify.scm
12.41
KB
-rw-r--r--
2021-05-10 17:28
with-cps.scm
5.72
KB
-rw-r--r--
2021-05-10 17:28
Save
Rename
;;; Continuation-passing style (CPS) intermediate language (IL) ;; Copyright (C) 2021 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 as published by the Free Software Foundation; either ;;;; version 3 of the License, or (at your option) any later version. ;;;; ;;;; This library is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; Lesser General Public License for more details. ;;;; ;;;; You should have received a copy of the GNU Lesser General Public ;;;; License along with this library; if not, write to the Free Software ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;;; Commentary: ;;; ;;; If we have a $callk to a $kfun that has a $kclause, in most cases we ;;; can skip arity checks because the caller knows what arity the callee ;;; is expecting. ;;; ;;; Code: (define-module (language cps elide-arity-checks) #:use-module (ice-9 match) #:use-module (language cps) #:use-module (language cps intmap) #:use-module (language cps utils) #:use-module (language cps with-cps) #:export (elide-arity-checks)) (define (arity-matches? arity self proc args) (match arity (($ $arity req () #f () #f) (= (+ (length req) (if self 1 0)) (+ (length args) (if proc 1 0)))) (_ #f))) (define (maybe-elide-arity-check cps kfun proc args) (match (intmap-ref cps kfun) (($ $kfun fsrc meta self ktail kentry) (match (and kentry (intmap-ref cps kentry)) (($ $kclause (? (lambda (arity) (arity-matches? arity self proc args)) arity) kbody #f) ;; This is a compatible $callk to a $kfun that checks its arity ;; and has no alternate; arrange to elide the check. (match (intmap-ref cps kbody) (($ $kargs fnames fvars term) (match term (($ $continue (? (lambda (k) (eq? k ktail))) _ ($ $callk kfun' (? (lambda (proc') (eq? proc' self))) (? (lambda (args) (equal? args fvars))))) ;; This function already trampolines out to another ;; function; forward this call there. Could recurse but ;; we shouldn't need to, and we don't so as to avoid ;; divergence. (with-cps cps (build-exp ($callk kfun' proc args)))) (_ ;; Define a new unchecked function containing the body of ;; this function. (let ((self' (and self (fresh-var))) (fvars' (map (lambda (_) (fresh-var)) fvars))) (with-cps cps ;; Entry of new kfun' is the $kargs kbody. (letk kfun' ($kfun fsrc meta self ktail kbody)) (letk ktail' ($ktail)) (letk kbody' ($kargs fnames fvars' ($continue ktail' fsrc ($callk kfun' self' fvars')))) (letk kentry' ($kclause ,arity kbody' #f)) (setk kfun ($kfun fsrc meta self' ktail' kentry')) ;; Dispatch source $callk to new kfun'. (build-exp ($callk kfun' proc args))))))))) (_ ;; Either this is already a $callk to a "raw" $kfun (one that ;; doesn't check its arity), in which case we're good; or a call ;; with possibly incompatible arity, or a call to a case-lambda, ;; in which case we punt for now. (with-cps cps (build-exp ($callk kfun proc args)))))))) ;; This transformation removes references to arity-checking $kfun's, but ;; doesn't remove them, leaving that to renumbering or DCE to fix up. (define (elide-arity-checks cps) (with-fresh-name-state cps (persistent-intmap (intmap-fold (lambda (label cont cps) (match cont (($ $kargs names vars ($ $continue k src ($ $callk kfun proc args))) (with-cps cps (let$ exp (maybe-elide-arity-check kfun proc args)) (setk label ($kargs names vars ($continue k src ,exp))))) (_ cps))) (persistent-intmap cps) (transient-intmap cps)))))