Jump to content
Posted 21 September 2004 - 07:35 AM
Posted 21 September 2004 - 11:21 AM
Posted 21 September 2004 - 10:21 PM
Should you decide to go with another scripting library that have the functionality you describe I would be very grateful if you let me know which one you choose. That would allow me to analyze that scripting library and maybe incorporate some of its solutions into AngelScript.
Posted 22 September 2004 - 02:30 AM
Posted 22 September 2004 - 07:52 AM
write-reference(obj) // using the unique integer tag assigned to it
write-base-data(obj) // involves a switch statement on the type of the object
add-to-serialized-list(obj) // add the object to the mapping, with a unique integer tag
foreach reference "ref" in obj
Posted 22 September 2004 - 08:02 AM
Posted 22 September 2004 - 10:42 AM
Quote:Yes, it does; all objects, even value (non-gc'ed) objects, are tagged with their type. To a certain extent this information is necessary for serialization, because it lets the serializer know what type to treat it as (serializing a number as though it were a function wouldn't work). However, if your VM is type-agnostic it's not necessarily impossible to do this; all you need is the size of the object and a way of resolving its references.
Original post by WitchLord
And from what I understand Lua also has a way to obtain the type of each value on the stack. Isn't that so?
Posted 22 September 2004 - 10:50 AM
Posted 23 September 2004 - 02:42 AM