.
--- a/Class.st Thu Sep 14 14:17:35 1995 +0200
+++ b/Class.st Fri Sep 15 01:22:26 1995 +0200
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Class.st,v 1.61 1995-09-13 18:51:47 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Class.st,v 1.62 1995-09-14 23:21:46 claus Exp $
'!
!Class class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Class.st,v 1.61 1995-09-13 18:51:47 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Class.st,v 1.62 1995-09-14 23:21:46 claus Exp $
"
!
@@ -1184,7 +1184,7 @@
"append a primitiveVariables-record to aStream"
aStream nextPutAll:aClass name
- , ' primitiveVariables: '
+ , ' primitiveVariables:'
, aClass primitiveVariablesString storeString.
aStream nextPutChunkSeparator.
!
@@ -1193,7 +1193,7 @@
"append a primitiveDefinitions-record to aStream"
aStream nextPutAll:aClass name
- , ' primitiveDefinitions: '
+ , ' primitiveDefinitions:'
, aClass primitiveDefinitionsString storeString.
aStream nextPutChunkSeparator.
!
@@ -1202,7 +1202,7 @@
"append a primitiveFunctions-record to aStream"
aStream nextPutAll:aClass name
- , ' primitiveFunctions: '
+ , ' primitiveFunctions:'
, aClass primitiveFunctionsString storeString.
aStream nextPutChunkSeparator.
!
--- a/ObjMem.st Thu Sep 14 14:17:35 1995 +0200
+++ b/ObjMem.st Fri Sep 15 01:22:26 1995 +0200
@@ -34,7 +34,7 @@
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Attic/ObjMem.st,v 1.54 1995-09-10 19:20:24 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ObjMem.st,v 1.55 1995-09-14 23:22:26 claus Exp $
'!
!ObjectMemory class methodsFor:'documentation'!
@@ -55,7 +55,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Attic/ObjMem.st,v 1.54 1995-09-10 19:20:24 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ObjMem.st,v 1.55 1995-09-14 23:22:26 claus Exp $
"
!
@@ -1376,17 +1376,6 @@
"
!
-printReferences:anObject
- "for debugging: print referents to anObject.
- WARNING:
- this method will vanish;
- use ObjectMemory>>whoReferences: or anObject>>allOwners."
-
-%{
- __printRefChain(__context, anObject);
-%}
-!
-
collectObjectsWhich:aBlock
"helper for the whoReferences queries. Returns a collection
of objects for which aBlock returns true."
@@ -1438,11 +1427,54 @@
"
!
+maximumIdentityHashValue
+ "for ST-80 compatibility: return the maximum value
+ a hashKey as returned by identityHash can get.
+ Since ST/X uses direct pointers, a field in the objectHeader
+ is used, which is currently 11 bits in size."
+
+%{ /* NOCONTEXT */
+ RETURN ( __MKSMALLINT( __MAX_HASH__ << __HASH_SHIFT__) );
+%}
+ "
+ ObjectMemory maximumIdentityHashValue
+ "
+! !
+
+!ObjectMemory class methodsFor:'debug queries'!
+
+printReferences:anObject
+ "for debugging: print referents to anObject.
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice
+ use ObjectMemory>>whoReferences: or anObject>>allOwners."
+
+%{
+ __printRefChain(__context, anObject);
+%}
+!
+
+dumpObject:someObject
+ "low level dump an object.
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
+
+%{
+ dumpObject(someObject);
+%}
+ "
+ ObjectMemory dumpObject:true
+ ObjectMemory dumpObject:(Array new:10)
+ ObjectMemory dumpObject:(10@20 corner:30@40)
+ "
+!
+
addressOf:anObject
"return the core address of anObject as an integer
- since objects may move around, the returned value is invalid after the
next scavenge/collect.
- Use only for debugging."
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
%{ /* NOCONTEXT */
@@ -1468,7 +1500,8 @@
BIG BIG DANGER ALERT:
this method is only to be used for debugging ST/X itself
- you can easily (and badly) crash the system.
- This method may be removed from the final shipping version"
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
|low high|
@@ -1484,7 +1517,8 @@
sizeOf:anObject
"return the size of anObject in bytes.
(this is not the same as 'anObject size').
- Use only for debugging/memory monitoring."
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
%{ /* NOCONTEXT */
@@ -1508,23 +1542,39 @@
"
!
-spaceOf:anObject
- "return the memory space, in which anObject is.
- - since objects may move between spaces,
- the returned value may be invalid after the next scavenge/collect.
- For debugging only; Dont use this method; it may vanish."
+ageOf:anObject
+ "return the number of scavenges, an object has survived
+ in new space.
+ For old objects and living contexts, the returned number is invalid.
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
%{ /* NOCONTEXT */
if (! __isNonNilObject(anObject)) {
- RETURN ( nil );
+ RETURN ( 0 );
}
- RETURN ( _MKSMALLINT( __qSpace(anObject) ) );
+ RETURN ( _MKSMALLINT( _GET_AGE(anObject) ) );
%}
+ "
+ |p|
+ p := Point new.
+ (ObjectMemory ageOf:p) printNL.
+ ObjectMemory tenuringScavenge.
+ (ObjectMemory spaceOf:p) printNL.
+ ObjectMemory tenuringScavenge.
+ (ObjectMemory spaceOf:p) printNL.
+ ObjectMemory tenuringScavenge.
+ (ObjectMemory spaceOf:p) printNL.
+ ObjectMemory tenuringScavenge.
+ (ObjectMemory spaceOf:p) printNL.
+ "
!
flagsOf:anObject
- "For debugging only; Dont use this method; it may vanish."
+ "For debugging only.
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
%{ /* NOCONTEXT */
@@ -1550,46 +1600,20 @@
"
!
-ageOf:anObject
- "return the number of scavenges, an object has survived
- in new space.
- For old objects and living contexts, the returned number is invalid.
- For debugging only; Dont use this method; it may vanish."
+spaceOf:anObject
+ "return the memory space, in which anObject is.
+ - since objects may move between spaces,
+ the returned value may be invalid after the next scavenge/collect.
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
%{ /* NOCONTEXT */
if (! __isNonNilObject(anObject)) {
- RETURN ( 0 );
+ RETURN ( nil );
}
- RETURN ( _MKSMALLINT( _GET_AGE(anObject) ) );
+ RETURN ( _MKSMALLINT( __qSpace(anObject) ) );
%}
- "
- |p|
- p := Point new.
- (ObjectMemory ageOf:p) printNL.
- ObjectMemory tenuringScavenge.
- (ObjectMemory spaceOf:p) printNL.
- ObjectMemory tenuringScavenge.
- (ObjectMemory spaceOf:p) printNL.
- ObjectMemory tenuringScavenge.
- (ObjectMemory spaceOf:p) printNL.
- ObjectMemory tenuringScavenge.
- (ObjectMemory spaceOf:p) printNL.
- "
-!
-
-maximumIdentityHashValue
- "for ST-80 compatibility: return the maximum value
- a hashKey as returned by identityHash can get.
- Since ST/X uses direct pointers, a field in the objectHeader
- is used, which is currently 11 bits in size."
-
-%{ /* NOCONTEXT */
- RETURN ( __MKSMALLINT( __MAX_HASH__ << __HASH_SHIFT__) );
-%}
- "
- ObjectMemory maximumIdentityHashValue
- "
! !
!ObjectMemory class methodsFor:'garbage collection'!
--- a/ObjectMemory.st Thu Sep 14 14:17:35 1995 +0200
+++ b/ObjectMemory.st Fri Sep 15 01:22:26 1995 +0200
@@ -34,7 +34,7 @@
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.54 1995-09-10 19:20:24 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.55 1995-09-14 23:22:26 claus Exp $
'!
!ObjectMemory class methodsFor:'documentation'!
@@ -55,7 +55,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.54 1995-09-10 19:20:24 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ObjectMemory.st,v 1.55 1995-09-14 23:22:26 claus Exp $
"
!
@@ -1376,17 +1376,6 @@
"
!
-printReferences:anObject
- "for debugging: print referents to anObject.
- WARNING:
- this method will vanish;
- use ObjectMemory>>whoReferences: or anObject>>allOwners."
-
-%{
- __printRefChain(__context, anObject);
-%}
-!
-
collectObjectsWhich:aBlock
"helper for the whoReferences queries. Returns a collection
of objects for which aBlock returns true."
@@ -1438,11 +1427,54 @@
"
!
+maximumIdentityHashValue
+ "for ST-80 compatibility: return the maximum value
+ a hashKey as returned by identityHash can get.
+ Since ST/X uses direct pointers, a field in the objectHeader
+ is used, which is currently 11 bits in size."
+
+%{ /* NOCONTEXT */
+ RETURN ( __MKSMALLINT( __MAX_HASH__ << __HASH_SHIFT__) );
+%}
+ "
+ ObjectMemory maximumIdentityHashValue
+ "
+! !
+
+!ObjectMemory class methodsFor:'debug queries'!
+
+printReferences:anObject
+ "for debugging: print referents to anObject.
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice
+ use ObjectMemory>>whoReferences: or anObject>>allOwners."
+
+%{
+ __printRefChain(__context, anObject);
+%}
+!
+
+dumpObject:someObject
+ "low level dump an object.
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
+
+%{
+ dumpObject(someObject);
+%}
+ "
+ ObjectMemory dumpObject:true
+ ObjectMemory dumpObject:(Array new:10)
+ ObjectMemory dumpObject:(10@20 corner:30@40)
+ "
+!
+
addressOf:anObject
"return the core address of anObject as an integer
- since objects may move around, the returned value is invalid after the
next scavenge/collect.
- Use only for debugging."
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
%{ /* NOCONTEXT */
@@ -1468,7 +1500,8 @@
BIG BIG DANGER ALERT:
this method is only to be used for debugging ST/X itself
- you can easily (and badly) crash the system.
- This method may be removed from the final shipping version"
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
|low high|
@@ -1484,7 +1517,8 @@
sizeOf:anObject
"return the size of anObject in bytes.
(this is not the same as 'anObject size').
- Use only for debugging/memory monitoring."
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
%{ /* NOCONTEXT */
@@ -1508,23 +1542,39 @@
"
!
-spaceOf:anObject
- "return the memory space, in which anObject is.
- - since objects may move between spaces,
- the returned value may be invalid after the next scavenge/collect.
- For debugging only; Dont use this method; it may vanish."
+ageOf:anObject
+ "return the number of scavenges, an object has survived
+ in new space.
+ For old objects and living contexts, the returned number is invalid.
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
%{ /* NOCONTEXT */
if (! __isNonNilObject(anObject)) {
- RETURN ( nil );
+ RETURN ( 0 );
}
- RETURN ( _MKSMALLINT( __qSpace(anObject) ) );
+ RETURN ( _MKSMALLINT( _GET_AGE(anObject) ) );
%}
+ "
+ |p|
+ p := Point new.
+ (ObjectMemory ageOf:p) printNL.
+ ObjectMemory tenuringScavenge.
+ (ObjectMemory spaceOf:p) printNL.
+ ObjectMemory tenuringScavenge.
+ (ObjectMemory spaceOf:p) printNL.
+ ObjectMemory tenuringScavenge.
+ (ObjectMemory spaceOf:p) printNL.
+ ObjectMemory tenuringScavenge.
+ (ObjectMemory spaceOf:p) printNL.
+ "
!
flagsOf:anObject
- "For debugging only; Dont use this method; it may vanish."
+ "For debugging only.
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
%{ /* NOCONTEXT */
@@ -1550,46 +1600,20 @@
"
!
-ageOf:anObject
- "return the number of scavenges, an object has survived
- in new space.
- For old objects and living contexts, the returned number is invalid.
- For debugging only; Dont use this method; it may vanish."
+spaceOf:anObject
+ "return the memory space, in which anObject is.
+ - since objects may move between spaces,
+ the returned value may be invalid after the next scavenge/collect.
+ WARNING: this method is for ST/X debugging only
+ it will be removed without notice"
%{ /* NOCONTEXT */
if (! __isNonNilObject(anObject)) {
- RETURN ( 0 );
+ RETURN ( nil );
}
- RETURN ( _MKSMALLINT( _GET_AGE(anObject) ) );
+ RETURN ( _MKSMALLINT( __qSpace(anObject) ) );
%}
- "
- |p|
- p := Point new.
- (ObjectMemory ageOf:p) printNL.
- ObjectMemory tenuringScavenge.
- (ObjectMemory spaceOf:p) printNL.
- ObjectMemory tenuringScavenge.
- (ObjectMemory spaceOf:p) printNL.
- ObjectMemory tenuringScavenge.
- (ObjectMemory spaceOf:p) printNL.
- ObjectMemory tenuringScavenge.
- (ObjectMemory spaceOf:p) printNL.
- "
-!
-
-maximumIdentityHashValue
- "for ST-80 compatibility: return the maximum value
- a hashKey as returned by identityHash can get.
- Since ST/X uses direct pointers, a field in the objectHeader
- is used, which is currently 11 bits in size."
-
-%{ /* NOCONTEXT */
- RETURN ( __MKSMALLINT( __MAX_HASH__ << __HASH_SHIFT__) );
-%}
- "
- ObjectMemory maximumIdentityHashValue
- "
! !
!ObjectMemory class methodsFor:'garbage collection'!