You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by mb...@apache.org on 2016/11/04 13:44:43 UTC
incubator-systemml git commit: [SYSTEMML-1081] Fix parser constant
propagation w/ indexed identifiers
Repository: incubator-systemml
Updated Branches:
refs/heads/master acc2b4375 -> 638eabe8b
[SYSTEMML-1081] Fix parser constant propagation w/ indexed identifiers
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/638eabe8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/638eabe8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/638eabe8
Branch: refs/heads/master
Commit: 638eabe8b33b02e333d8e5471c43e4c4df2c0818
Parents: acc2b43
Author: Matthias Boehm <mb...@gmail.com>
Authored: Fri Nov 4 13:16:28 2016 +0100
Committer: Matthias Boehm <mb...@gmail.com>
Committed: Fri Nov 4 14:38:32 2016 +0100
----------------------------------------------------------------------
src/main/java/org/apache/sysml/parser/StatementBlock.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/638eabe8/src/main/java/org/apache/sysml/parser/StatementBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/parser/StatementBlock.java b/src/main/java/org/apache/sysml/parser/StatementBlock.java
index bc5ab4e..62278eb 100644
--- a/src/main/java/org/apache/sysml/parser/StatementBlock.java
+++ b/src/main/java/org/apache/sysml/parser/StatementBlock.java
@@ -628,9 +628,11 @@ public class StatementBlock extends LiveVariableAnalysis
}
IntIdentifier intid = null;
if (bife.getOpCode() == Expression.BuiltinFunctionOp.NROW){
- intid = new IntIdentifier(currVal.getDim1(), bife.getFilename(), bife.getBeginLine(), bife.getBeginColumn(), bife.getEndLine(), bife.getEndColumn());
+ intid = new IntIdentifier((currVal instanceof IndexedIdentifier)?((IndexedIdentifier)currVal).getOrigDim1():currVal.getDim1(),
+ bife.getFilename(), bife.getBeginLine(), bife.getBeginColumn(), bife.getEndLine(), bife.getEndColumn());
} else {
- intid = new IntIdentifier(currVal.getDim2(), bife.getFilename(), bife.getBeginLine(), bife.getBeginColumn(), bife.getEndLine(), bife.getEndColumn());
+ intid = new IntIdentifier((currVal instanceof IndexedIdentifier)?((IndexedIdentifier)currVal).getOrigDim2():currVal.getDim2(),
+ bife.getFilename(), bife.getBeginLine(), bife.getBeginColumn(), bife.getEndLine(), bife.getEndColumn());
}
// handle case when nrow / ncol called on variable with size unknown (dims == -1)