Skip to content

Commit

Permalink
Fix: nits; Catch EXTERN PRAGMA parse error and rethrow warning
Browse files Browse the repository at this point in the history
  • Loading branch information
macrologist committed Jun 3, 2024
1 parent 9deaee6 commit f439e31
Show file tree
Hide file tree
Showing 5 changed files with 359 additions and 347 deletions.
12 changes: 8 additions & 4 deletions src/ast.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ compilation passes."))
((name :reader extern-name
:initarg :name
:documentation "The name of the function."))
(:documentation "A function that operates on classical memory and values, declared to
(:documentation "A procedure that operates on classical memory and values, declared to
be available in the underlying system."))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Definitions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down Expand Up @@ -1126,17 +1126,21 @@ Each addressing mode will be a vector of symbols:
(defclass call (classical-instruction)
((extern
:initarg :extern
:reader call-extern)
:reader call-extern
:type extern
:documentation "The extern to be called.")
(arguments
:initarg :arguments
:reader call-arguments)))
:reader call-arguments
:documentation "A list of memory refs and constant values"))
(:documentation "A call to an EXTERN function."))

(defmethod mnemonic ((call call))
(declare (ignore call))
(values "CALL" 'call))

(defmethod arguments ((call call))
(map 'vector #'identity (cons (call-extern call) (call-arguments call))))
(coerce (cons (call-extern call) (call-arguments call)) 'vector))

(defclass jump (instruction)
((label :initarg :label
Expand Down
Loading

0 comments on commit f439e31

Please sign in to comment.