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
35d84b07
Commit
35d84b07
authored
34 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Added stuff to compute the right cost for simple type predicates that
aren't a lowtag check.
parent
377768be
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/mips/type-vops.lisp
+15
-16
15 additions, 16 deletions
compiler/mips/type-vops.lisp
with
15 additions
and
16 deletions
compiler/mips/type-vops.lisp
+
15
−
16
View file @
35d84b07
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/type-vops.lisp,v 1.2
1
1990/10/
0
4 2
3:25:20 wlott
Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/type-vops.lisp,v 1.2
2
1990/10/
1
4 2
2:39:06 ram
Exp $
;;;
;;; This file contains the VM definition of type testing and checking VOPs
;;; for the RT.
...
...
@@ -46,21 +46,20 @@
(
test-simple-type
value
temp
target
not-p
type-code
)))
(
macrolet
((
frob
(
pred-name
check-name
ptype
type-code
error-code
)
`
(
progn
(
define-vop
(
,
pred-name
simple-type-predicate
)
(
:variant
,
type-code
)
(
:translate
,
pred-name
))
(
define-vop
(
,
check-name
check-simple-type
)
(
:generator
4
(
let
((
err-lab
(
generate-error-code
vop
,
error-code
value
)))
(
test-simple-type
value
temp
err-lab
t
,
type-code
)
(
move
result
value
))))
(
primitive-type-vop
,
check-name
(
:check
)
,
ptype
))))
;; ### Want to tweek costs so that checks that do dereferences are
;; more expensive.
;;
(
let
((
cost
(
if
(
<
(
eval
type-code
)
vm:lowtag-limit
)
4
9
)))
`
(
progn
(
define-vop
(
,
pred-name
simple-type-predicate
)
(
:variant
,
type-code
)
(
:variant-cost
,
cost
)
(
:translate
,
pred-name
))
(
define-vop
(
,
check-name
check-simple-type
)
(
:generator
,
cost
(
let
((
err-lab
(
generate-error-code
vop
,
error-code
value
)))
(
test-simple-type
value
temp
err-lab
t
,
type-code
)
(
move
result
value
))))
(
primitive-type-vop
,
check-name
(
:check
)
,
ptype
)))))
(
frob
functionp
check-function
function
vm:function-pointer-type
object-not-function-error
)
...
...
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