From 82061474b2d84e94d8dfb970d4a553d1f3090cfa Mon Sep 17 00:00:00 2001 From: "pl@gohorb.ba-horb.de" Date: Tue, 4 Apr 2023 17:26:13 +0200 Subject: [PATCH] modified: resources/bytecode/javFiles/Scalar.jav modified: src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java --- resources/bytecode/javFiles/Scalar.jav | 3 +++ .../de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/bytecode/javFiles/Scalar.jav b/resources/bytecode/javFiles/Scalar.jav index 381869af..b731df11 100644 --- a/resources/bytecode/javFiles/Scalar.jav +++ b/resources/bytecode/javFiles/Scalar.jav @@ -6,6 +6,8 @@ import java.lang.Float; public class Scalar extends Vector { + +/* /statistics auskommentiert Scalar(v) { Integer i; i = 0; @@ -14,6 +16,7 @@ public class Scalar extends Vector { i=i+1; } } + */ mul(v) { var ret = 0; diff --git a/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java b/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java index ecd7600f..198b0f4c 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java @@ -495,7 +495,7 @@ public class TYPEStmt implements StatementVisitor{ @Override public void visit(Return returnExpr) { returnExpr.retexpr.accept(this); - constraintsSet.addUndConstraint(new Pair(returnExpr.getType(),info.getCurrentTypeScope().getReturnType(), PairOperator.SMALLERDOT)); + constraintsSet.addUndConstraint(new Pair(returnExpr.getType(),info.getCurrentTypeScope().getReturnType(), PairOperator.EQUALSDOT)); } @Override @@ -610,8 +610,8 @@ public class TYPEStmt implements StatementVisitor{ //Fuer Bytecodegenerierung PL 2020-03-09 wird derzeit nicht benutzt ENDE - methodConstraint.add(new Pair(assumption.getReturnType(resolver), forMethod.getType(), PairOperator.SMALLERDOT)); - extendsMethodConstraint.add(new Pair(assumption.getReturnType(resolver), forMethod.getType(), PairOperator.SMALLERDOT)); + methodConstraint.add(new Pair(assumption.getReturnType(resolver), forMethod.getType(), PairOperator.EQUALSDOT)); + extendsMethodConstraint.add(new Pair(assumption.getReturnType(resolver), forMethod.getType(), PairOperator.EQUALSDOT)); Set parameterContraints = generateParameterConstraints(forMethod, assumption, info, resolver);