pouzzler wrote
What is meant at various places in the API by 'should only be called when <condition>'.
Does it mean the method being described doesn't need to check for errors, or quite the contrary?
For example:
Returns the dest mnemonic in the current C-command (8 possibilities). Should be called only when commandType() is C_COMMAND.
Does this mean this method had to validate commandType() is C_COMMAND, or that the caller has to make that validation?
It does not need to do the validation. Since you are writing this module for your own use, you can control when it is called to ensure that there is a 'dest' to return. If you were writing objects for other programmers to use, you would want to spend more time making them bulletproof.
--Mark