[svn:parrot] r46884 - branches/ops_pct/runtime/parrot/library
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Sat May 22 11:36:13 UTC 2010
Author: fperrad
Date: Sat May 22 11:36:13 2010
New Revision: 46884
URL: https://trac.parrot.org/parrot/changeset/46884
Log:
[opsc] partial revert of r46858, so restore my work done in r46667 & r46670
Modified:
branches/ops_pct/runtime/parrot/library/distutils.pir
Modified: branches/ops_pct/runtime/parrot/library/distutils.pir
==============================================================================
--- branches/ops_pct/runtime/parrot/library/distutils.pir Sat May 22 09:17:16 2010 (r46883)
+++ branches/ops_pct/runtime/parrot/library/distutils.pir Sat May 22 11:36:13 2010 (r46884)
@@ -1057,8 +1057,6 @@
.param string cflags
.param string ldflags
mkpath('dynext', 1 :named('verbose'))
- .local pmc cores
- cores = get_cores()
.local string load_ext
load_ext = get_load_ext()
$P0 = iter hash
@@ -1067,18 +1065,10 @@
.local string ops, src
ops = shift $P0
src = hash[ops]
- $P1 = iter cores
- L3:
- unless $P1 goto L4
- .local string core, suffix
- core = shift $P1
- suffix = cores[core]
- $S0 = _mk_path_dynops(ops, suffix, load_ext)
+ $S0 = _mk_path_dynops(ops, load_ext)
$I0 = newer($S0, src)
- if $I0 goto L3
- __build_dynops(src, ops, core, suffix, cflags, ldflags)
- goto L3
- L4:
+ if $I0 goto L1
+ __build_dynops(src, ops, cflags, ldflags)
goto L1
L2:
.end
@@ -1086,31 +1076,24 @@
.sub '__build_dynops' :anon
.param string src
.param string ops
- .param string core
- .param string suffix
.param string cflags
.param string ldflags
.local pmc config
config = get_config()
.local string cmd
- cmd = config['perl']
- cmd .= " "
- $S0 = get_tool('build/ops2c.pl')
- cmd .= $S0
- cmd .= " "
- cmd .= core
+ cmd = get_executable('ops2c')
cmd .= " --dynamic "
cmd .= src
system(cmd, 1 :named('verbose'))
$S0 = config['o']
- $S1 = _mk_path_gen_dynops(src, ops, suffix, $S0)
- $S2 = _mk_path_gen_dynops(src, ops, suffix, '.c')
+ $S1 = _mk_path_gen_dynops(src, ops, $S0)
+ $S2 = _mk_path_gen_dynops(src, ops, '.c')
__compile_cc($S1, $S2, cflags)
.local string dynext
$S0 = config['load_ext']
- dynext = _mk_path_dynops(ops, suffix, $S0)
+ dynext = _mk_path_dynops(ops, $S0)
cmd = config['ld']
cmd .= " "
$S0 = config['ld_out']
@@ -1118,7 +1101,7 @@
cmd .= dynext
cmd .= " "
$S0 = config['o']
- $S0 = _mk_path_gen_dynops(src, ops, suffix, $S0)
+ $S0 = _mk_path_gen_dynops(src, ops, $S0)
cmd .= $S0
cmd .= " "
$S0 = get_ldflags()
@@ -1176,10 +1159,8 @@
.sub '_mk_path_dynops' :anon
.param string ops
- .param string suffix
.param string load_ext
$S0 = "dynext/" . ops
- $S0 .= suffix
$S0 .= load_ext
.return ($S0)
.end
@@ -1187,22 +1168,14 @@
.sub '_mk_path_gen_dynops' :anon
.param string src
.param string ops
- .param string suffix
.param string ext
$S0 = dirname(src)
$S0 .= "/"
$S0 .= ops
- $S0 .= suffix
$S0 .= ext
.return ($S0)
.end
-.sub 'get_cores'
- $P0 = new 'Hash'
- $P0['C'] = ''
- .return ($P0)
-.end
-
=item dynpmc
hash
@@ -1711,8 +1684,6 @@
.sub 'clean_dynops'
.param pmc hash
- .local pmc cores
- cores = get_cores()
.local string load_ext, obj
load_ext = get_load_ext()
obj = get_obj()
@@ -1722,22 +1693,14 @@
.local string ops, src
ops = shift $P0
src = hash[ops]
- $P1 = iter cores
- L3:
- unless $P1 goto L4
- .local string core, suffix
- core = shift $P1
- suffix = cores[core]
- $S0 = _mk_path_dynops(ops, suffix, load_ext)
+ $S0 = _mk_path_dynops(ops, load_ext)
unlink($S0, 1 :named('verbose'))
- $S0 = _mk_path_gen_dynops(src, ops, suffix, '.c')
+ $S0 = _mk_path_gen_dynops(src, ops, '.c')
unlink($S0, 1 :named('verbose'))
- $S0 = _mk_path_gen_dynops(src, ops, suffix, '.h')
+ $S0 = _mk_path_gen_dynops(src, ops, '.h')
unlink($S0, 1 :named('verbose'))
- $S0 = _mk_path_gen_dynops(src, ops, suffix, obj)
+ $S0 = _mk_path_gen_dynops(src, ops, obj)
unlink($S0, 1 :named('verbose'))
- goto L3
- L4:
goto L1
L2:
.end
@@ -2407,26 +2370,17 @@
.sub 'get_install_dynops' :anon
.param pmc files
.param pmc hash
- .local string libdir, load_ext, ops, suffix
+ .local string libdir, load_ext, ops
libdir = get_libdir()
load_ext = get_load_ext()
- .local pmc cores
- cores = get_cores()
$P0 = iter hash
L1:
unless $P0 goto L2
ops = shift $P0
- $P1 = iter cores
- L3:
- unless $P1 goto L4
- $S0 = shift $P1
- suffix = cores[$S0]
- $S1 = _mk_path_dynops(ops, suffix, load_ext)
+ $S1 = _mk_path_dynops(ops, load_ext)
$S2 = libdir . "/"
$S2 .= $S1
files[$S2] = $S1
- goto L3
- L4:
goto L1
L2:
.end
More information about the parrot-commits
mailing list