[Scummvm-cvs-logs] SF.net SVN: scummvm:[50440] scummvm/trunk/engines/sci/engine
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Jun 28 14:28:30 CEST 2010
Revision: 50440
http://scummvm.svn.sourceforge.net/scummvm/?rev=50440&view=rev
Author: fingolfin
Date: 2010-06-28 12:28:29 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
SCI: Clarify docs of GC related SegmentObj methods
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/script.h
scummvm/trunk/engines/sci/engine/segment.h
Modified: scummvm/trunk/engines/sci/engine/script.h
===================================================================
--- scummvm/trunk/engines/sci/engine/script.h 2010-06-28 12:28:12 UTC (rev 50439)
+++ scummvm/trunk/engines/sci/engine/script.h 2010-06-28 12:28:29 UTC (rev 50440)
@@ -107,6 +107,12 @@
virtual Common::Array<reg_t> listAllDeallocatable(SegmentId segId) const;
virtual Common::Array<reg_t> listAllOutgoingReferences(reg_t object) const;
+ /**
+ * Return a list of all references to objects in this script
+ * (and also to the locals segment, if any).
+ * Used by the garbage collector.
+ * @return a list of outgoing references within the object
+ */
Common::Array<reg_t> listObjectReferences() const;
virtual void saveLoadWithSerializer(Common::Serializer &ser);
Modified: scummvm/trunk/engines/sci/engine/segment.h
===================================================================
--- scummvm/trunk/engines/sci/engine/segment.h 2010-06-28 12:28:12 UTC (rev 50439)
+++ scummvm/trunk/engines/sci/engine/segment.h 2010-06-28 12:28:29 UTC (rev 50440)
@@ -105,6 +105,7 @@
/**
* Finds the canonic address associated with sub_reg.
+ * Used by the garbage collector.
*
* For each valid address a, there exists a canonic address c(a) such that c(a) = c(c(a)).
* This address "governs" a in the sense that deallocating c(a) will deallocate a.
@@ -115,14 +116,15 @@
/**
* Deallocates all memory associated with the specified address.
+ * Used by the garbage collector.
* @param sub_addr address (within the given segment) to deallocate
*/
virtual void freeAtAddress(SegManager *segMan, reg_t sub_addr) {}
/**
- * Iterates over and reports all addresses within the current segment.
- * @param note Invoked for each address on which free_at_address() makes sense
- * @param param parameter passed to 'note'
+ * Iterates over and reports all addresses within the segment.
+ * Used by the garbage collector.
+ * @return a list of addresses within the segment
*/
virtual Common::Array<reg_t> listAllDeallocatable(SegmentId segId) const {
return Common::Array<reg_t>();
@@ -130,9 +132,11 @@
/**
* Iterates over all references reachable from the specified object.
+ * Used by the garbage collector.
* @param object object (within the current segment) to analyse
- * @return refs a list of outgoing references within the object
- * Note: This function may also choose to report numbers (segment 0) as adresses
+ * @return a list of outgoing references within the object
+ *
+ * @note This function may also choose to report numbers (segment 0) as adresses
*/
virtual Common::Array<reg_t> listAllOutgoingReferences(reg_t object) const {
return Common::Array<reg_t>();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list