You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7134b09e50
The purpose of this change is to avoid the need to index register variables storing match results of sequences whose elements are labeled. The indexing happened when match results of labeled elements were passed to action/predicate functions. In order to avoid indexing, the register allocator needs to ensure that registers storing match results of any labeled sequence elements are still "alive" after finishing parsing of the sequence. They should not be used to store anything else at least until code of all actions and predicates that can see the labels is executed. This requires that the |allocateRegisters| pass has the knowledge of scoping. Because that knowledge was already implicitly embedded in the |coputeParams| pass, the logical step to prevent duplication was to merge it with the |allocateRegisters| pass. This is what this commit does. As a part of the merge the tests of both passes were largely refactored. This is both to accomodate the merge and to make the tests in sync with the code again (the tests became a bit out-of-sync during the last few commits -- they tested more than was needed). The speed/size impact is slightly positive: Speed impact ------------ Before: 849.86 kB/s After: 858.16 kB/s Difference: 0.97% Size impact ----------- Before: 876618 b After: 875602 b Difference: -0.12% (Measured by /tools/impact with Node.js v0.6.18 on x86_64 GNU/Linux.) |
12 years ago | |
---|---|---|
.. | ||
passes | 12 years ago |