Skip to content

Commit

Permalink
builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Whiteknight committed Nov 9, 2009
1 parent a545cf3 commit 2df6d8d
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Configure.nqp
Expand Up @@ -15,7 +15,7 @@ sub MAIN () {
say("to figure out how to build matrixy.\n");

# Load Parrot config and glue functions
load_bytecode('aux/config-helpers.pir');
load_bytecode('build/config-helpers.pir');

# Check for linalg_group
Q:PIR {
Expand All @@ -28,7 +28,7 @@ sub MAIN () {
say "http://www.github.com/Whiteknight/parrot-linear-algebra"
exit 1
linalg_group_loaded:
}
};
# Slurp in the unconfigured Makefile text
my $unconfigured := slurp(@ARGS[0] || 'config/makefiles/root.in');
Expand Down
2 changes: 1 addition & 1 deletion src/builtins/abs.pir
Expand Up @@ -4,7 +4,7 @@
.param int nargout
.param int nargin
.param pmc matrix
.const Sub helper = '!_abs_helper'
.const "Sub" helper = '!_abs_helper'

$P0 = clone matrix
$P0.'iterate_function_inplace'(helper)
Expand Down
2 changes: 1 addition & 1 deletion src/builtins/arrayfun.pir
Expand Up @@ -12,7 +12,7 @@ Apply a function 'func' to each element of an array 'A'.
.param pmc f
.param pmc A
.param pmc O :slurpy
.const Sub helper = "!_arrayfun_helper"
.const "Sub" helper = "!_arrayfun_helper"

$S0 = typeof f
if $S0 == 'Sub' goto main
Expand Down
2 changes: 1 addition & 1 deletion src/builtins/ceil.pir
Expand Up @@ -4,7 +4,7 @@
.param int nargout
.param int nargin
.param pmc matrix
.const Sub helper = "!_ceil_helper"
.const "Sub" helper = "!_ceil_helper"

$P0 = clone matrix
$P0.'iterate_function_inplace'(helper)
Expand Down
11 changes: 7 additions & 4 deletions src/builtins/columns.pir
Expand Up @@ -3,11 +3,14 @@
.sub 'columns'
.param int nargout
.param int nargin
.param pmc x
$S0 = typeof x
.param pmc matrix

$P0 = matrix
$S0 = typeof $P0
if $S0 == 'NumMatrix2D' goto _its_an_array
.return(1)
_its_an_array:
$I0 = getattribute "X"
$P1 = getattribute $P0, "X"
$I0 = $P1
.return($I0)
.end
.end
4 changes: 2 additions & 2 deletions src/builtins/floor.pir
Expand Up @@ -4,7 +4,7 @@
.param int nargout
.param int nargin
.param pmc matrix
.const Sub helper = "!_floor_helper"
.const "Sub" helper = "!_floor_helper"

$P0 = clone matrix
$P0.'iterate_function_inplace'(helper)
Expand All @@ -13,7 +13,7 @@

.sub '!_floor_helper' :anon
.param pmc matrix
.param num matrix
.param num value
.param int x
.param int y
$N0 = matrix
Expand Down
6 changes: 3 additions & 3 deletions src/builtins/round.pir
Expand Up @@ -4,11 +4,11 @@
.param int nargout
.param int nargin
.param pmc matrix
.const Sub helper = "__round_helper"
.const "Sub" helper = "__round_helper"

$S0 = typeof x
$S0 = typeof matrix
if $S0 == 'NumMatrix2D' goto _have_matrix
.return(x)
.return(matrix)

_have_matrix:
.local pmc new_matrix
Expand Down
6 changes: 3 additions & 3 deletions src/builtins/rows.pir
Expand Up @@ -10,8 +10,8 @@
.return(1)

_its_an_array:
.local pmc y
y = getattribute "Y"
.return(y)
$P0 = getattribute matrix, "Y"
$I0 = $P0
.return($I0)
.end

10 changes: 4 additions & 6 deletions src/builtins/size.pir
Expand Up @@ -14,11 +14,9 @@
.return(result)

_its_an_array:
.local int x
x = get_attr "X"
.local int y
y = get_attr "Y"
result[0;0] = x
result[0;1] = y
$P0 = getattribute matrix, "X"
$P1 = getattribute matrix, "Y"
result[0;0] = $P0
result[0;1] = $P1
.return(result)
.end
2 changes: 1 addition & 1 deletion src/internals/matrix.pir
Expand Up @@ -311,7 +311,7 @@ Can only dispatch over an internal function, not a builtin or a library routine.
.param pmc a
.param pmc b
.param pmc sub
.const Sub handler = '!distribute_op_handler'
.const "Sub" handler = '!distribute_op_handler'
$P0 = a.'iterate_function_external'(handler, b, sub)
.return($P0)
.end
Expand Down

0 comments on commit 2df6d8d

Please sign in to comment.