commit | ff74a74a7c0535a51d677c36fd6a37c34d30ea38 | [log] [tgz] |
---|---|---|
author | David Srbecky <dsrbecky@google.com> | Thu Sep 06 11:30:36 2018 +0100 |
committer | David Srbecky <dsrbecky@google.com> | Wed Sep 12 12:58:57 2018 +0100 |
tree | 156c0e1cf4334f05e7bcea05b5e8e1ff5efce7bf | |
parent | ee6ad006e25eb07f4866935255d13b3d87cd46e5 [diff] |
Rewrite the mterp code generator and the template snippets. This changes the code generation, but the generated assembly files are unchanged (except for some whitespace differences). This replaces the custom template meta-language with python. All the architecture-specific template files are concatenated to create one big python script. This generated python script is then executed to produced the final assembly file. The template syntax is: * Lines starting with % are python code. They will be copied as-is to the script (without the %) and thus executed during the generation. * Other lines are text, and they are essentially syntax sugar for out.write('''(line text)''') and thus they write the main output. * Within a text line, $ can be used insert variables from code. This makes the code generation simpler and it will make it possible to use full power of python within the snippets to simplify code. Test: test-art-host-gtest Change-Id: I8325ca406b328f82163241b3d698f94de5e38bff