This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate from maint:
[perl5.git] / ext / B / ramblings / cc.notes
1 At entry to each basic block, the following can be assumed (and hence
2 must be forced where necessary at the end of each basic block):
3
4 The shadow stack @stack is empty.
5 For each lexical object in @pad, VALID_IV holds for each T_INT,
6 VALID_DOUBLE holds for each T_DOUBLE and VALID_SV holds otherwise.
7 The C shadow variable sp holds the stack pointer (not necessarily stack_sp).
8
9 write_back_stack
10     Writes the contents of the shadow stack @stack back to the real stack.
11     A write-back of each object in the stack is forced so that its
12     backing SV contains the right value and that SV is then pushed onto the
13     real stack. On return, @stack is empty.
14
15 write_back_lexicals
16     Forces a write-back (i.e. achieves VALID_SV), where necessary, for each
17     lexical object in @pad. Objects with the TEMPORARY flag are skipped. If
18     write_back_lexicals is called with an (optional) argument, then it is
19     taken to be a bitmask of more flags: any lexical object with one of those
20     flags set is also skipped and not written back to its SV.
21
22 invalidate_lexicals($avoid)
23     The VALID_INT and VALID_DOUBLE flags are turned off for each lexical
24     object in @pad whose flags field doesn't overlap with $avoid.
25
26 reload_lexicals
27     For each necessary lexical object in @pad, makes sure that VALID_IV
28     holds for objects of type T_INT, VALID_DOUBLE holds for objects for
29     type T_DOUBLE, and VALID_SV holds for other objects. An object is
30     considered for reloading if its flags field does not overlap with the
31     (optional) argument passed to reload_lexicals.
32