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
e4017c89
Commit
e4017c89
authored
32 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added support for type_ByteCodeFunction and type_ByteCodeClosure, two
additional closure types.
parent
5741aafc
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
ldb/gc.c
+10
-44
10 additions, 44 deletions
ldb/gc.c
with
10 additions
and
44 deletions
ldb/gc.c
+
10
−
44
View file @
e4017c89
/*
/*
* Stop and Copy GC based on Cheney's algorithm.
* Stop and Copy GC based on Cheney's algorithm.
*
*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/gc.c,v 1.3
3
1992/0
3/08 18:39:3
8 wlott Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/gc.c,v 1.3
4
1992/0
4/15 00:45:4
8 wlott Exp $
*
*
* Written by Christopher Hoover.
* Written by Christopher Hoover.
*/
*/
...
@@ -607,7 +607,6 @@ lispobj *from_space, *from_space_free_pointer;
...
@@ -607,7 +607,6 @@ lispobj *from_space, *from_space_free_pointer;
/* Code and Code-Related Objects */
/* Code and Code-Related Objects */
static
lispobj
trans_function_header
();
static
lispobj
trans_function_header
();
static
lispobj
trans_closure_function_header
();
static
lispobj
trans_boxed
();
static
lispobj
trans_boxed
();
static
static
...
@@ -635,20 +634,12 @@ lispobj *where, object;
...
@@ -635,20 +634,12 @@ lispobj *where, object;
type
=
TypeOf
(
first
);
type
=
TypeOf
(
first
);
switch
(
type
)
{
switch
(
type
)
{
case
type_FunctionHeader
:
case
type_FunctionHeader
:
copy
=
trans_function_header
(
object
);
break
;
case
type_ClosureFunctionHeader
:
case
type_ClosureFunctionHeader
:
copy
=
trans_
closure_
function_header
(
object
);
copy
=
trans_function_header
(
object
);
break
;
break
;
case
type_ClosureHeader
:
default:
case
type_FuncallableInstanceHeader
:
copy
=
trans_boxed
(
object
);
copy
=
trans_boxed
(
object
);
break
;
break
;
default:
fprintf
(
stderr
,
"GC lossage. Bogus function pointer.
\n
"
);
fprintf
(
stderr
,
"Pointer: 0x%08x, Header: 0x%08x
\n
"
,
(
unsigned
long
)
object
,
(
unsigned
long
)
first
);
gc_lose
();
}
}
first
=
*
first_pointer
=
copy
;
first
=
*
first_pointer
=
copy
;
...
@@ -874,35 +865,6 @@ lispobj object;
...
@@ -874,35 +865,6 @@ lispobj object;
}
}
static
scav_closure_function_header
(
where
,
object
)
lispobj
*
where
,
object
;
{
fprintf
(
stderr
,
"GC lossage. Should not be scavenging a "
);
fprintf
(
stderr
,
"Closure Function Header.
\n
"
);
fprintf
(
stderr
,
"where = 0x%08x, object = 0x%08x"
,
(
unsigned
long
)
where
,
(
unsigned
long
)
object
);
gc_lose
();
}
static
lispobj
trans_closure_function_header
(
object
)
lispobj
object
;
{
struct
function_header
*
fheader
;
unsigned
long
offset
;
struct
code
*
code
,
*
ncode
;
fheader
=
(
struct
function_header
*
)
PTR
(
object
);
offset
=
HeaderValue
(
fheader
->
header
)
*
4
;
/* Transport the whole code object */
code
=
(
struct
code
*
)
((
unsigned
long
)
fheader
-
offset
);
ncode
=
trans_code
(
code
);
return
((
lispobj
)
ncode
+
offset
)
|
type_FunctionPointer
;
}
/* Structures */
/* Structures */
...
@@ -1799,10 +1761,12 @@ gc_init()
...
@@ -1799,10 +1761,12 @@ gc_init()
scavtab
[
type_ComplexArray
]
=
scav_boxed
;
scavtab
[
type_ComplexArray
]
=
scav_boxed
;
scavtab
[
type_CodeHeader
]
=
scav_code_header
;
scavtab
[
type_CodeHeader
]
=
scav_code_header
;
scavtab
[
type_FunctionHeader
]
=
scav_function_header
;
scavtab
[
type_FunctionHeader
]
=
scav_function_header
;
scavtab
[
type_ClosureFunctionHeader
]
=
scav_
closure_
function_header
;
scavtab
[
type_ClosureFunctionHeader
]
=
scav_function_header
;
scavtab
[
type_ReturnPcHeader
]
=
scav_return_pc_header
;
scavtab
[
type_ReturnPcHeader
]
=
scav_return_pc_header
;
scavtab
[
type_ClosureHeader
]
=
scav_boxed
;
scavtab
[
type_ClosureHeader
]
=
scav_boxed
;
scavtab
[
type_FuncallableInstanceHeader
]
=
scav_boxed
;
scavtab
[
type_FuncallableInstanceHeader
]
=
scav_boxed
;
scavtab
[
type_ByteCodeFunction
]
=
scav_boxed
;
scavtab
[
type_ByteCodeClosure
]
=
scav_boxed
;
scavtab
[
type_ValueCellHeader
]
=
scav_boxed
;
scavtab
[
type_ValueCellHeader
]
=
scav_boxed
;
scavtab
[
type_SymbolHeader
]
=
scav_boxed
;
scavtab
[
type_SymbolHeader
]
=
scav_boxed
;
scavtab
[
type_BaseChar
]
=
scav_immediate
;
scavtab
[
type_BaseChar
]
=
scav_immediate
;
...
@@ -1842,10 +1806,12 @@ gc_init()
...
@@ -1842,10 +1806,12 @@ gc_init()
transother
[
type_ComplexArray
]
=
trans_boxed
;
transother
[
type_ComplexArray
]
=
trans_boxed
;
transother
[
type_CodeHeader
]
=
trans_code_header
;
transother
[
type_CodeHeader
]
=
trans_code_header
;
transother
[
type_FunctionHeader
]
=
trans_function_header
;
transother
[
type_FunctionHeader
]
=
trans_function_header
;
transother
[
type_ClosureFunctionHeader
]
=
trans_
closure_
function_header
;
transother
[
type_ClosureFunctionHeader
]
=
trans_function_header
;
transother
[
type_ReturnPcHeader
]
=
trans_return_pc_header
;
transother
[
type_ReturnPcHeader
]
=
trans_return_pc_header
;
transother
[
type_ClosureHeader
]
=
trans_boxed
;
transother
[
type_ClosureHeader
]
=
trans_boxed
;
transother
[
type_FuncallableInstanceHeader
]
=
trans_boxed
;
transother
[
type_FuncallableInstanceHeader
]
=
trans_boxed
;
transother
[
type_ByteCodeFunction
]
=
trans_boxed
;
transother
[
type_ByteCodeClosure
]
=
trans_boxed
;
transother
[
type_ValueCellHeader
]
=
trans_boxed
;
transother
[
type_ValueCellHeader
]
=
trans_boxed
;
transother
[
type_SymbolHeader
]
=
trans_boxed
;
transother
[
type_SymbolHeader
]
=
trans_boxed
;
transother
[
type_BaseChar
]
=
trans_immediate
;
transother
[
type_BaseChar
]
=
trans_immediate
;
...
@@ -1895,7 +1861,7 @@ gc_init()
...
@@ -1895,7 +1861,7 @@ gc_init()
#if 0
#if 0
/* Shouldn't see these so just lose if it happens */
/* Shouldn't see these so just lose if it happens */
sizetab[type_FunctionHeader] = size_function_header;
sizetab[type_FunctionHeader] = size_function_header;
sizetab[type_ClosureFunctionHeader] = size_
closure_
function_header;
sizetab[type_ClosureFunctionHeader] = size_function_header;
sizetab[type_ReturnPcHeader] = size_return_pc_header;
sizetab[type_ReturnPcHeader] = size_return_pc_header;
#endif
#endif
sizetab
[
type_ClosureHeader
]
=
size_boxed
;
sizetab
[
type_ClosureHeader
]
=
size_boxed
;
...
...
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