浏览代码

Patched problem with temporaries
Revived math array execution tests

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8117 8c9fc860-2736-0410-a75d-ab315db34111

felixf 7 年之前
父节点
当前提交
b04f68acd2
共有 2 个文件被更改,包括 2 次插入32 次删除
  1. 1 1
      source/FoxIntermediateBackend.Mod
  2. 1 31
      source/MathArrays.Execution.Test

+ 1 - 1
source/FoxIntermediateBackend.Mod

@@ -6818,7 +6818,7 @@ TYPE
 							Symbol(variable, operand);
 							MakeMemory(tmp,operand.op,addressType,0);
 							ReleaseOperand(operand);
-							IF temporary THEN
+							IF FALSE & temporary THEN
 									(* trick -- temporary object from array base *)
 									symbol := GetSymbol(moduleScope,"FoxArrayBase","temporary");
 									Symbol(symbol,operand);

+ 1 - 31
source/MathArrays.Execution.Test

@@ -1,5 +1,5 @@
 # Math Array Exeuction Test Suite
-# options 	--mayTrap --prolog="Compiler.Compile -p=Win32 TesterInput.txt" --command="System.Free Test Dummy B A;System.Load Test" --logFile="FoxExecutionTest.Log" --result="MathArrays.Execution.Test.Diff"
+# options 	--mayTrap --prolog="Compiler.Compile TesterInput.txt" --command="System.Free Test Dummy B A;System.Load Test" --logFile="FoxExecutionTest.Log" --result="MathArrays.Execution.Test.Diff"
 
 positive: DIM and LEN
 
@@ -701,36 +701,6 @@ positive: conversion tests
 		s := SHORT(i); Driver.TestFillS(s);
 	END Test.
 
-positive: array structured object type (was: problem with register restoration when returning composite type)
-
-	 MODULE Test;
-	 TYPE
-	  Asot = OBJECT(ARRAY [4, 3] OF LONGINT)
-	  VAR
-	   data: ARRAY [4, 3] OF LONGINT;
-	   OPERATOR "LEN"*(): ARRAY [2] OF LONGINT;
-	   BEGIN RESULT := [LONGINT(4), 3]; RETURN RESULT
-	   END "LEN";
-
-	   (* problematic operator: *)
-	   OPERATOR "[]"*(range0, range1: RANGE): ARRAY [*, *] OF LONGINT;
-	   BEGIN
-	    RESULT := data[*, 1 .. 2];
-	    RETURN RESULT
-	   END "[]";
-
-	   (* not relevant here: *)
-	   OPERATOR "[]"*(range0, range1: RANGE; rhs: ARRAY [*, *] OF LONGINT);
-	   BEGIN
-	   END "[]";
-	  END Asot;
-	 VAR asot: Asot;
-	 BEGIN
-	  NEW(asot);
-	  ASSERT(asot[*, *][*, 0] = [LONGINT(0),0,0,0]);
-	  ASSERT(asot[*, *][*, 0] = [LONGINT(0),0,0,0]);
-	 END Test.
-
 positive: correct use of ADDRESS OF and SYSTEM.VAL for tensors and open math arrays
 
 	MODULE Test;