Skip to content

Commit

Permalink
- Also apply -O1 optimzation to included files.
Browse files Browse the repository at this point in the history
  • Loading branch information
trizen committed Sep 29, 2019
1 parent 80d3ea6 commit 3de1b0b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Sidef/Optimizer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,11 @@ package Sidef::Optimizer {
elsif ($ref eq 'Sidef::Meta::Module') {
$obj->{block}{code} = {$self->optimize($obj->{block}{code})};
}
elsif ($ref eq 'Sidef::Meta::Included') {
foreach my $info (@{$obj->{included}}) {
$info->{ast} = {$self->optimize($info->{ast})};
}
}

if (not exists($expr->{ind}) and not exists($expr->{call})) {
return (ref($obj) eq 'HASH' ? {self => $obj} : $obj);
Expand Down

0 comments on commit 3de1b0b

Please sign in to comment.