#715 JavaScript/HTML codegen: fix function parameter and local variable references
- Best to review per commit.
- Function JS/HTML code generation changes that are the main scope of this merge request:
- Improved exception message.
- Use single quotes for strings in generated JS code.
- No compile errors for unreachable statements in JS code, unlike Java.
- Various changes for references, reading variables, writing variables, etc.
- Other non-JS/HTML-specific changes (not end user visible for the other target languages):
- No more references to commented out code to
readOnlyfromVariableInformation, as that field doesn't exist. - Removed
VariableInformation.isReference, as only assigned, copied, etc, but never read. - Proper and consistent marking of temporary variables.
- Renamed
VariableInformation.targetNametotargetRef. - Renamed
CodeGen.getTargetNametogetTargetRef. - Implement target variable name logic in
getTargetVariableNameinstead of ingetTargetRef. The reference should default to the name, not the other way around. Then also Simulink code generation does not need to overridegetTargetVariableNameanymore. - Renamed
SimulinkCodeGen.simulinkTargetNameMaptosimulinkTargetRefMap. - Renamed
SimulinkCodeGen.setupVarmapstosetupVarMaps. - Some other renaming etc, for consistency.
- Add
CodeGen.getPrefix()and use it inCodeGen.
- No more references to commented out code to
Addresses #715