summaryrefslogtreecommitdiff
path: root/scripts/process_optimize_instructions.py
blob: a9337b13b97543e63466f7f75004f17dfd75496e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python

import os

root = os.path.dirname(os.path.dirname(__file__))

infile = os.path.join(root, 'src', 'passes', 'OptimizeInstructions.wast')
outfile = os.path.join(root, 'src', 'passes',
                       'OptimizeInstructions.wast.processed')

out = open(outfile, 'w')

for line in open(infile):
  out.write('"' + line.strip().replace('"', '\\"') + '\\n"\n')

out.close()