Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[js] Turn nqp::throwpayloadlex into an direct return when possible.
- Loading branch information
Showing
6 changed files
with
91 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
my class ReturnInfo { | ||
has $!block; | ||
has int $!used; | ||
method mark_used() { | ||
$!used := 1; | ||
} | ||
method is_used() { | ||
$!used; | ||
} | ||
} | ||
|
||
my class TopLevelInBlock is ReturnInfo { | ||
has $!block; | ||
method as_return() { | ||
return nqp::eqaddr($!block, $*BLOCK); | ||
} | ||
} | ||
|
||
my class NotTopLevel is ReturnInfo { | ||
method as_return() { | ||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters