Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
8a989743
Commit
8a989743
authored
35 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added support for continuable errors.
parent
5ed2ea46
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/mips/macros.lisp
+39
-10
39 additions, 10 deletions
compiler/mips/macros.lisp
with
39 additions
and
10 deletions
compiler/mips/macros.lisp
+
39
−
10
View file @
8a989743
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.2
3
1990/03/
08 11:13:37
wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/macros.lisp,v 1.2
4
1990/03/
12 23:47:15
wlott Exp $
;;;
;;;
;;; This file contains various useful macros for generating MIPS code.
;;; This file contains various useful macros for generating MIPS code.
;;;
;;;
...
@@ -472,17 +472,31 @@
...
@@ -472,17 +472,31 @@
;;;; Error Code
;;;; Error Code
(
eval-when
(
compile
load
eval
)
(
defun
emit-error-break
(
kind
code
values
)
`
((
inst
break
,
kind
)
(
inst
byte
,
code
)
,@
(
mapcar
#'
(
lambda
(
tn
)
`
(
let
((
tn
,
tn
))
(
assert
(
eq
(
sb-name
(
sc-sb
(
tn-sc
tn
)))
'registers
))
(
inst
byte
(
tn-offset
tn
))))
values
)
(
inst
byte
0
)
(
align
vm:word-shift
))))
(
defmacro
error-call
(
error-code
&rest
values
)
(
defmacro
error-call
(
error-code
&rest
values
)
"Cause an error. ERROR-CODE is the error to cause."
(
cons
'progn
(
emit-error-break
vm:error-trap
error-code
values
)))
(
defmacro
cerror-call
(
label
error-code
&rest
values
)
"Cause a continuable error. If the error is continued, execution resumes at
LABEL."
`
(
progn
`
(
progn
(
inst
break
vm:error-trap
)
(
b
,
label
)
(
inst
byte
,
error-code
)
,@
(
emit-error-break
vm:cerror-trap
error-code
values
)))
(
inst
byte
,
(
length
values
))
,@
(
mapcar
#'
(
lambda
(
value
)
`
(
let
((
tn
,
value
))
(
assert
(
eq
(
sb-name
(
sc-sb
(
tn-sc
tn
)))
'registers
))
(
inst
byte
(
tn-offset
tn
))))
values
)
(
align
vm:word-shift
)))
(
defmacro
generate-error-code
(
node
error-code
&rest
values
)
(
defmacro
generate-error-code
(
node
error-code
&rest
values
)
"Generate-Error-Code Node Error-code Value*
"Generate-Error-Code Node Error-code Value*
...
@@ -495,6 +509,21 @@
...
@@ -495,6 +509,21 @@
(
error-call
,
error-code
,@
values
)
(
error-call
,
error-code
,@
values
)
start-lab
))))
start-lab
))))
(
defmacro
generate-cerror-code
(
node
error-code
&rest
values
)
"Generate-CError-Code Node Error-code Value*
Emit code for a continuable error with the specified Error-Code and
context Values. Node is used for source context. If the error is continued,
execution resumes after the GENERATE-CERROR-CODE form."
(
let
((
continue
(
gensym
"CONTINUE-LABEL-"
))
(
error
(
gensym
"ERROR-LABEL-"
)))
`
(
let
((
,
continue
(
gen-label
)))
(
emit-label
,
continue
)
(
unassemble
(
assemble-elsewhere
,
node
(
let
((
,
error
(
gen-label
)))
(
emit-label
,
error
)
(
cerror-call
,
continue
,
error-code
,@
values
)
,
error
))))))
;;; PSEUDO-ATOMIC -- Handy macro for making sequences look atomic.
;;; PSEUDO-ATOMIC -- Handy macro for making sequences look atomic.
;;;
;;;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment