This fixes a bug in generation of --strict wrappers, where a value is serialized
before the serialization code for the object is added to the hash. Instead we
place the Strict.* statements at the end of the generated code.
As compileFileWithSource is called recursively on imported files, this patch
changes the type of compiler output to ([JsStmt], [JsStmt]), being a tuple of the
initial (header) and final (footer) statements. These are formed separately and
finally joined together in compileTopLevelModule.
This fixes a bug in generation of --strict wrappers, where a value is serialized before the serialization code for the object is added to the hash. Instead we place the Strict.* statements at the end of the generated code.
As compileFileWithSource is called recursively on imported files, this patch changes the type of compiler output to ([JsStmt], [JsStmt]), being a tuple of the initial (header) and final (footer) statements. These are formed separately and finally joined together in compileTopLevelModule.