Changeset 7383 for lang/elisp/escm/trunk/escm-vm.el
- Timestamp:
- 03/03/08 03:20:00 (5 years ago)
- Files:
-
- 1 modified
-
lang/elisp/escm/trunk/escm-vm.el (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/elisp/escm/trunk/escm-vm.el
r6617 r7383 2 2 (require 'escm-cbos) 3 3 (require 'escm-proc) 4 (require 'escm-wrapped-proc)5 4 6 (defconst 'escm-vm::init-hook ()) 5 (defconst 'escm-vm::init-hook ()) 6 (defconst 'escm-vm::serial-number 0) 7 7 (defun escm-vm-init (vm) (run-hook-with-args 'escm-vm::init-hook vm)) 8 8 … … 58 58 (escm-vm::push-args vm ()))) 59 59 60 60 61 (defsubst escm-vm::t-call (vm) 61 62 (let ((proc (escm-vm::get-current-val)) … … 69 70 (escm-vm::set-current-pc vm 0) 70 71 (escm-vm::set-current-args vm ()))) 72 71 73 72 74 (defsubst escm-vm::ret (vm) … … 86 88 (escm-vm::pop-args vm)) 87 89 90 88 91 (defsubst escm-vm::step (vm) 89 92 (let ((pc (escm-vm::get-current-pc vm))) 90 93 (apply (aref (escm-vm::get-current-proc vm) pc) (list vm)) 91 94 (escm-vm::set-current-pc vm (1+ pc)))) 95 96 97 (defsubst escm-vm::apply (vm proc args) 98 (let ((procs (escm-vm::get-proc-stack vm)) 99 (retval (progn (escm-vm::set-proc-stack ()) 100 (escm-vm::set-current-args vn args) 101 (escm-vm::set-current-value vm proc) 102 (escm-vm::call vm) 103 (while (escm-vm::get-proc-stack vm) 104 (escm-vm::step vm))))) 105 (escm-vm::set-proc-stack vm proc) 106 retval))
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)