1.1 --- a/test.py Fri Jun 28 21:17:02 2013 +0200
1.2 +++ b/test.py Sat Jun 29 01:28:12 2013 +0200
1.3 @@ -5,7 +5,6 @@
1.4 import micropython.deduce
1.5 import micropython.report
1.6 import micropython.syspython
1.7 -import rsvp
1.8 import sys
1.9 import os
1.10
1.11 @@ -14,16 +13,6 @@
1.12 "/usr/share/micropython/lib"
1.13 ]
1.14
1.15 -def show_code(code):
1.16 - for i, x in enumerate(code):
1.17 - print i, x
1.18 -
1.19 -def show_table_usage(raw_table, slice_size=100):
1.20 - for x in xrange(0, len(raw_table), slice_size):
1.21 - table_slice = raw_table[x:x+slice_size]
1.22 - print "%6d" % (len(table_slice) - table_slice.count(None)), \
1.23 - "".join(entry and "#" or "_" for entry in table_slice)
1.24 -
1.25 def show_warnings(attribute_usage_failures):
1.26 failures = list(attribute_usage_failures)
1.27 failures.sort()
1.28 @@ -33,25 +22,12 @@
1.29 print >>sys.stderr, "%s: Name %r with %s attributes %r" % (
1.30 unit_name, name, all_attributes and "all" or "any", ", ".join(attrnames))
1.31
1.32 -def attrs(obj):
1.33 - for name, attr in obj.items():
1.34 - print name, attr
1.35 -
1.36 -def reset():
1.37 - global rm
1.38 - rm = rsvp.machine(p)
1.39 -
1.40 # Main program.
1.41
1.42 if __name__ == "__main__":
1.43 args = sys.argv[2:]
1.44 path = libdirs + sys.path[:]
1.45
1.46 - if "--help" in sys.argv:
1.47 - print "Optimisations:"
1.48 - print micropython.cmd.show_optimisations()
1.49 - sys.exit(1)
1.50 -
1.51 if len(sys.argv) > 1 and sys.argv[1] != "-":
1.52 filename = os.path.abspath(sys.argv[1])
1.53 path.append(os.path.split(filename)[0])
1.54 @@ -124,17 +100,6 @@
1.55 finally:
1.56 f.close()
1.57
1.58 - # Build the program.
1.59 -
1.60 - if "-m" in args or "-t" in args:
1.61 - rm = rsvp.machine(p, debug=("-g" in args), abort_upon_exception=("-x" in args))
1.62 -
1.63 - if "-t" in args:
1.64 - success = rm.test(m)
1.65 - print "Test successful?", success
1.66 -
1.67 - print "RSVP machine: rm = %r" % rm
1.68 -
1.69 ot = p.get_object_table()
1.70 pt = p.get_parameter_table()
1.71