-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaccess.lisp
More file actions
44 lines (38 loc) · 1.9 KB
/
access.lisp
File metadata and controls
44 lines (38 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
(in-package #:maclina.machine)
;;; Some basic functions for getting at parts of the VM state.
(defgeneric symbol-value (client environment symbol))
(defgeneric (setf symbol-value) (new client environment symbol))
(defgeneric boundp (client environment symbol))
(defgeneric makunbound (client environment symbol))
(defgeneric call-with-progv (client environment symbols values thunk))
(defmacro progv (client environment symbols values &body body)
`(call-with-progv ,client ,environment ,symbols ,values
(lambda () ,@body)))
(defgeneric fboundp (client environment function-name))
(defgeneric fdefinition (client environment function-name))
(defgeneric (setf fdefinition) (new client environment function-name))
(defgeneric fmakunbound (client environment function-name))
;;; And getting at the Common Lisp evaluator constants.
;;; Most of these are pretty baked into the definition of the VM, but maybe a client
;;; has its own ideas. They're also kind of sketchy at high numbers - you could technically
;;; have 65535 parameters, but then there wouldn't be any indices left for local variables.
(defgeneric lambda-parameters-limit (client)
(:method (client)
(declare (ignore client))
#.(1- (expt 2 16))))
(defgeneric call-arguments-limit (client)
(:method (client)
(declare (ignore client))
#.(1- (expt 2 16))))
(defgeneric lambda-list-keywords (client)
(:method (client)
(declare (ignore client))
'(&whole &optional &rest &body &key &allow-other-keys &aux &environment)))
(defgeneric multiple-values-limit (client))
;;; A few other things that are useful for the loader but not really related to
;;; VM state. If we required Clostrum we wouldn't need these, or the fdefinition
;;; methods above.
;;; Should signal an error if the class is missing.
(defgeneric find-class (client environment class-name))
;;; Also used by the file compiler.
(defgeneric find-package (client environment package-name))