Created a basic hash map data type and integrated it into the Dao
language's built-in data type table. Apart from it's general utility as
a feature for writing programs, it was necessary to create this hash map
data type for another reason: there is a new field in the
'Dao.Interpreter.ExecUnit' called 'Dao.Interpreter.runtimeRefTable',
which is shared between all modules. This table will store items that
should be allocated once and deleted once. For example a file handle is
associated with a file path which serves as a unique ID, and one should
always close the file handle before trying to open it again. But the Dao
reference model does not allow for this without a lot of extra coding in
the Dao script source code. Variables are destroyed when they go out of
scope which could close a file handle if it is stored in an object bound
to a variable. Re-opening a file handle with the same path and binding
it to a different variable before the first variable it was bound to has
gone out of scope will result in an error. The
'Dao.Interpreter.runtimeRefTable' should solve this problem: using the
file path as the unique ID, a file handle can be associated with the
file path, and the file path can be used everywhere to always retrieve
the already-open file handle.
Created a basic hash map data type and integrated it into the Dao
language's built-in data type table. Apart from it's general utility as
a feature for writing programs, it was necessary to create this hash map
data type for another reason: there is a new field in the
'Dao.Interpreter.ExecUnit' called 'Dao.Interpreter.runtimeRefTable',
which is shared between all modules. This table will store items that
should be allocated once and deleted once. For example a file handle is
associated with a file path which serves as a unique ID, and one should
always close the file handle before trying to open it again. But the Dao
reference model does not allow for this without a lot of extra coding in
the Dao script source code. Variables are destroyed when they go out of
scope which could close a file handle if it is stored in an object bound
to a variable. Re-opening a file handle with the same path and binding
it to a different variable before the first variable it was bound to has
gone out of scope will result in an error. The
'Dao.Interpreter.runtimeRefTable' should solve this problem: using the
file path as the unique ID, a file handle can be associated with the
file path, and the file path can be used everywhere to always retrieve
the already-open file handle.