Repository navigation
Expand file tree
/
Copy pathrun-tests-proxy.py
More file actions
71 lines (64 loc) · 2.11 KB
/
Copy pathrun-tests-proxy.py
File metadata and controls
71 lines (64 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import os
import sys
import compiler_dyn
import interp_Lvar
import interp_Lif
import interp_Lwhile
import interp_Ltup
import interp_Larray
import interp_Lfun
import interp_Llambda
import interp_Lany
import interp_Lcast
import interp_Lproxy
import interp_Cif
import interp_Ctup
import interp_Carray
import interp_Cfun
import interp_Clambda
import interp_Cany
import interp_Cproxy
import type_check_Lproxy
import type_check_Cproxy
import type_check_Lany
import type_check_Cany
from interp_x86.eval_x86 import interp_x86
from utils import run_tests, run_one_test
the_compiler = compiler_dyn.Compiler()
type_check_dict = {
"source": type_check_Lproxy.TypeCheckLproxy().type_check,
"shrink": type_check_Lproxy.TypeCheckLproxy().type_check,
"remove_complex_operands": type_check_Lany.TypeCheckLany().type_check,
"explicate_control": type_check_Cany.TypeCheckCany().type_check,
}
interp_dict = {
"proxy": interp_Lproxy.InterpLproxy().interp,
"shrink": interp_Lproxy.InterpLproxy().interp,
"uniquify": interp_Lproxy.InterpLproxy().interp,
"reveal_functions": interp_Lproxy.InterpLproxy().interp,
"cast_insert": interp_Lproxy.InterpLproxy().interp,
"reveal_casts": interp_Lproxy.InterpLproxy().interp,
"convert_assignments": interp_Lproxy.InterpLproxy().interp,
"convert_to_closures": interp_Lproxy.InterpLproxy().interp,
"limit_functions": interp_Lproxy.InterpLproxy().interp,
"expose_allocation": interp_Lproxy.InterpLproxy().interp,
"remove_complex_operands": interp_Lproxy.InterpLproxy().interp,
"explicate_control": interp_Cproxy.InterpCproxy().interp,
"select_instructions": interp_x86,
"assign_homes": interp_x86,
"allocate_registers": interp_x86,
"patch_instructions": interp_x86,
"prelude_and_conclusion": interp_x86,
}
if len(sys.argv) == 2:
one_test_file = sys.argv[1]
run_one_test(one_test_file, 'proxy',
the_compiler, 'proxy',
type_check_dict,
interp_dict,
)
else:
run_tests('proxy', the_compiler, 'proxy',
type_check_dict,
interp_dict,
)