forked from rurban/perl-compiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Todo
66 lines (59 loc) · 2.8 KB
/
Todo
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
* Fixes
BC_heavy: sanify INC before the compilers pollute them (toddr,atoomic)
attribute handlers (i.e. run-time attributes)
compile-time perlio layers (e.g. use open ...)
compile-time re-eval groups (?{})
smartmatch subrefs
compile-time stash-magic delete renames to ANON
use bytes AUTOLOAD handling
CvOUTSIDE for ordinary subs
CC backend: goto (needs test), some recursive calls fail
* Features
modularize (-m) for faster link times, buildcc, rperl integration
(branch modul)
* add new build tool which takes module names and paths from the
compiler, check timestamps and create/update compiled modules.
* filter out non-module related code in the compiler by looking at
the CopFILE.
backport improvements from oldmaster:
do not define symbols which are arguments of define (destructive
check)
store static bless packagenames
run-time label lookup (fixed)
skip code after BEGIN goto (usually Carp including B in some AUTOLOAD block, issue 61)
type checking: Devel::TypeCheck
compile time v. runtime initialisation (done):
execute run-time BEGIN blocks for side-effects such as print or chdir,
use and require not.
save PMOPs in compiled form (5.10thr missing)
selection of what to dump (done)
options for cutting out line info (COP elimination) etc. (-fcop, sortcv's)
shared constants: share_hek, constpv (done)
check module dependencies, vs. link libs static, not via DynaLoader (done)
check Bytecode op coverage in the tests, should cover all ops 0-142
ByteLoader compatibility: version, platform. eventually Bytecode version
portability (test with 5.6 on cygwin, partially done)
check CC op coverage, add tests
* Optimizations
-fro-inc read-only INC paths. not the AV, run-time savepvn (done)
-fno-destruct skip optree and sv destruction at all, leave it to the OS (done)
collect static strings beforehand, such as GvNAMEs, COP FILENAME (for pre 5.10)
and GV method names package::name. (done)
proper static init of PMOP SV's (only works dynamic >= 5.10)
proper static init of PVBM/FBM (done)
compile-time initialisation of AvARRAYs (improved with -fav-init and
-fav-init2)
collapse LISTOPs to UNOPs or BASEOPs
compile-time qw(), constant subs
variable types: global analysis of variables, type hints etc.
understand type decl and attrs
my int $i; my $j : int;
Devel::TypeCheck instead of magic variable _ir, ... suffices
e.g. mark IVonly SV's and magic/flags change functions and
optimize all op subtrees for the compiled backends to use direct ints.
understand MooseX::Method::Signatures and MooseX::Lexical::Types declarations
demand-loaded bytecode (leader of each basic block replaced by an op
which loads in bytecode for its block)
fast sub calls for CC backend
tailcall optimization (entersub -> leavesub => goto)
inline more small pp ops: enter, reset, stringify, ... (CC -finline-ops)