projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a864cb0
)
[project @ 2000-06-13 15:35:29 by partain]
author
partain
<unknown>
Tue, 13 Jun 2000 15:35:29 +0000
(15:35 +0000)
committer
partain
<unknown>
Tue, 13 Jun 2000 15:35:29 +0000
(15:35 +0000)
Initial revision
ghc/driver/split/ghc-split.lprl
patch
|
blob
|
history
diff --git
a/ghc/driver/split/ghc-split.lprl
b/ghc/driver/split/ghc-split.lprl
index
00c116e
..
3afe3f5
100644
(file)
--- a/
ghc/driver/split/ghc-split.lprl
+++ b/
ghc/driver/split/ghc-split.lprl
@@
-24,14
+24,10
@@
sub inject_split_markers {
$_ = <TMPI>;
}
print TMPO "__STG_SPLIT_MARKER(1)\n";
$_ = <TMPI>;
}
print TMPO "__STG_SPLIT_MARKER(1)\n";
- print TMPO $_ if ! /^\s*\/\* SPLIT \*\/\s*$/;
-
- # Have to be a bit careful detecting /* SPLIT */ comments
- # since a progam may use a string containing "/* SPLIT */"
- # We check that there is nothing else on the line
+ print TMPO $_ if ! /\/\* SPLIT \*\//;
while (<TMPI>) {
while (<TMPI>) {
- if (/^\s*\/\* SPLIT \*\/\s*$/) {
+ if (/\/\* SPLIT \*\//) {
$marker_no++;
print TMPO "__STG_SPLIT_MARKER($marker_no)\n";
next;
$marker_no++;
print TMPO "__STG_SPLIT_MARKER($marker_no)\n";
next;
@@
-58,7
+54,7
@@
sub split_asm_file {
%LocalConstant = (); # we have to subvert C compiler's commoning-up of constants...
%LocalConstant = (); # we have to subvert C compiler's commoning-up of constants...
- $s_stuff = &ReadTMPIUpToAMarker( '', $octr );
+ $s_stuff = &ReadTMPIUpToAMarker( '' );
# that first stuff is a prologue for all .s outputs
$prologue_stuff = &process_asm_block ( $s_stuff );
# $_ already has some of the next stuff in it...
# that first stuff is a prologue for all .s outputs
$prologue_stuff = &process_asm_block ( $s_stuff );
# $_ already has some of the next stuff in it...
@@
-70,14
+66,14
@@
sub split_asm_file {
$prologue_stuff =~ s|"/tmp/ghc\d+\.c"|"$ifile_root\.hc"|g;
while ( $_ ne '' ) { # not EOF
$prologue_stuff =~ s|"/tmp/ghc\d+\.c"|"$ifile_root\.hc"|g;
while ( $_ ne '' ) { # not EOF
- $octr++;
# grab and de-mangle a section of the .s file...
# grab and de-mangle a section of the .s file...
- $s_stuff = &ReadTMPIUpToAMarker ( $_, $octr );
+ $s_stuff = &ReadTMPIUpToAMarker ( $_ );
$this_piece = &process_asm_block ( $s_stuff );
# output to a file of its own
# open a new output file...
$this_piece = &process_asm_block ( $s_stuff );
# output to a file of its own
# open a new output file...
+ $octr++;
$ofname = "${Tmp_prefix}__${octr}.s";
open(OUTF, "> $ofname") || die "$Pgm: can't open output file: $ofname\n";
$ofname = "${Tmp_prefix}__${octr}.s";
open(OUTF, "> $ofname") || die "$Pgm: can't open output file: $ofname\n";
@@
-128,7
+124,7
@@
sub collectExports_mips { # Note: MIPS only
}
sub ReadTMPIUpToAMarker {
}
sub ReadTMPIUpToAMarker {
- local($str, $count) = @_; # already read bits
+ local($str) = @_; # already read bits
for ( $_ = <TMPI>; $_ ne '' && ! /_?__stg_split_marker/; $_ = <TMPI> ) {
for ( $_ = <TMPI>; $_ ne '' && ! /_?__stg_split_marker/; $_ = <TMPI> ) {
@@
-158,7
+154,7
@@
sub ReadTMPIUpToAMarker {
$_ = <TMPI>;
}
$_ = <TMPI>;
}
- print STDERR "### BLOCK:$count:\n$str" if $Dump_asm_splitting_info;
+ print STDERR "### BLOCK:\n$str" if $Dump_asm_splitting_info;
# return str
$str;
# return str
$str;
@@
-199,7
+195,7
@@
sub process_asm_block_sparc {
$str =~ s/^\.stabs "(ghc\d+\.c)"/.stabs "$ifile_root.hc"/g; # HACK HACK
# remove/record any literal constants defined here
$str =~ s/^\.stabs "(ghc\d+\.c)"/.stabs "$ifile_root.hc"/g; # HACK HACK
# remove/record any literal constants defined here
- while ( $str =~ /(\t\.align .\n(LC\d+):\n(\t\.ascii.*\n)+)/ ) {
+ while ( $str =~ /(\t\.align .\n(LC\d+):\n\t\.ascii.*\n)/ ) {
local($label) = $2;
local($body) = $1;
local($label) = $2;
local($body) = $1;
@@
-208,7
+204,7
@@
sub process_asm_block_sparc {
$LocalConstant{$label} = $body;
$LocalConstant{$label} = $body;
- $str =~ s/\t\.align .\nLC\d+:\n(\t\.ascii.*\n)+//;
+ $str =~ s/\t\.align .\nLC\d+:\n\t\.ascii.*\n//;
}
# inject definitions for any local constants now used herein
}
# inject definitions for any local constants now used herein