Up to now, the index for a code that is stored in the program is the index of the table entry in the static table entry array defined in the table source file. The new table model will not have an array of table entries, but instead will be separate table instances spread among several source files. The common connection will be through the constructor of the base table class. This constructor will put pointers to the entries into a standard vector. As each entry is put into this vector, its index within the vector will be put into an index member of the table entry.
A static index to entry vector was added to the table class along with the index instance member. The set index and add entry access function was added to set the index of the an entry and add the pointer to the entry to this vector. A call to this function was added to the erector function. The index access function was changed to return the value of the index member. The entry access function was changed to access the index to entry vector instead of the static table entries array. Both functions were made inline.
The comments were removed from the instance members since they were only stating the obvious, plus the comment for the expression info pointer member stated that a null pointer indicates no expression info even though this no longer applies because all entries are now assigned an expression info instance even it it is the null instance. This is an example of comments going stale and lying - a good reason for eliminating comments with code explains itself.
[branch table commit 9d74aacf42]
Sunday, January 25, 2015
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)