Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'opsc_llvm' of github.com:parrot/parrot into opsc_llvm
- Loading branch information
Showing
55 changed files
with
589 additions
and
402 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,5 +1,9 @@ | ||
#1 | ||
|
||
2011.03.15 Gerd | ||
* Released 3.2.0 | ||
See NEWS for more. | ||
|
||
2011.02.15 mikehh | ||
* Released 3.1.0 | ||
See NEWS for more. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.1.0 | ||
3.2.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
module Ops::Util; | ||
|
||
=begin Description | ||
Various utility functions. | ||
=end Description | ||
|
||
sub process_recursive($op, &ctor) { | ||
my $res; | ||
if pir::isnull($op) { | ||
$res := $op; | ||
} | ||
elsif pir::isa($op, 'Capture') { | ||
$res := &ctor($op); | ||
pir::push($res, process_recursive($_, &ctor)) for @($op); | ||
$res{$_} := process_recursive($op{$_}, &ctor) for $op.hash.keys; | ||
} | ||
elsif pir::does($op, 'array') { | ||
$res := $op.map(->$_ { process_recursive($_, &ctor) }); | ||
} | ||
else { | ||
$res := pir::clone($op); | ||
} | ||
$res; | ||
} | ||
|
||
sub from_capture($capture) { | ||
process_recursive($capture, -> $c { | ||
my $what := $c<WHAT>; | ||
$c.hash.delete('WHAT'); | ||
$what := pir::substr($what, 0, pir::length($what) - 2); | ||
my @parts := split('::', $what); | ||
|
||
my $WHAT := pir::get_hll_global__pps(@parts, @parts.pop); | ||
$WHAT.new; | ||
}); | ||
} | ||
|
||
sub to_capture($op) { | ||
process_recursive($op, -> $_ { | ||
my $what := ~$_.WHAT; | ||
$_ := pir::new('Capture'); | ||
$_<WHAT> := $what; | ||
$_.hash.delete('source'); | ||
$_ | ||
}); | ||
} | ||
|
||
sub strip_source($op) { | ||
process_recursive($op, -> $c { | ||
Q:PIR { | ||
$P1 = find_lex '$c' | ||
delete $P1['source'] | ||
}; | ||
pir::clone($c); | ||
}); | ||
} | ||
|
||
# vim: ft=perl6 |
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
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
Oops, something went wrong.