The iteration of the entries in the static table entry array that called an Erector instance for each entry was removed from the default constructor since the table entry constructor now does this. The only statements remaining in this constructor are the initialization of the other alternates. This constructor along with the single table instance will remain to initialize these other alternates until this can be reimplemented in the new class hierarchy.
With these constructors in place, the class hierarchy can be implemented one derived class at a time. As each is implemented, the entries will be removed from the static array along with the enumerator from the entry.
The method previously used to disable the copy constructor and copy assignment was to make them private so they are not accessible, at least from outside the class. C++11 has a better method of accomplish this using the new delete feature. C++11 also has move constructors and assignments, so these also needed to be deleted. For example, the copy constructor and assignments are disabled like this:
Table &operator=(const Table &) = delete;Some other minor changes were made. All instances of variables named operand index (mostly arguments of access functions) were renamed operand. This was already done in the Erector class. Several redundant comments were also removed.
Table(const Table &) = delete;
[branch table commit 9153b17e5e]
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.)