Skip to content

Commit

Permalink
Include debug locals into frame size calculation
Browse files Browse the repository at this point in the history
This implies that we'll be writing the new bytecode version; NQP will
bump to use this.
  • Loading branch information
jnthn committed Jan 29, 2019
1 parent cbb6abc commit a9d0257
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/MAST/Nodes.nqp
Expand Up @@ -1087,10 +1087,11 @@ class MAST::Frame is MAST::Node {
method num-annotations() { $!num-annotations }
method handlers() { @!handlers }
method size() {
my uint32 $size := 50
my uint32 $size := 54
+ 2 * nqp::elems(self.local_types)
+ 6 * nqp::elems(self.lexical_types)
+ 12 * nqp::elems(self.static_lex_values) / 4;
+ 12 * nqp::elems(self.static_lex_values) / 4
+ 6 * nqp::elems(self.debug_map);
for @!handlers {
$size := $size + 20;
if $_.category_mask +& 4096 {
Expand Down

0 comments on commit a9d0257

Please sign in to comment.