Project

General

Profile

Revision 10

Added by Willibald K. over 8 years ago

restrict list casts to something useful - i.e. inner type sizes must not change; this is in preparation for faster dynamic list support in momut; deep casts now need to be done manually by the user via fold operations or can be added again to the ooas compiler as a more expensive, special cast operator; also more cleaning of Qualitative Action System stuff

View differences:

OoaPrologVisitor.java
40 40
import org.momut.ooas.ast.identifiers.TypeIdentifier;
41 41
import org.momut.ooas.ast.statements.Block;
42 42
import org.momut.ooas.ast.types.FunctionType;
43
import org.momut.ooas.ast.types.TypeKind;
44 43
import org.momut.ooas.ast.types.FunctionType.FunctionTypeEnum;
45 44
import org.momut.ooas.codegen.OoasCodeEmitter;
46 45
import org.momut.ooas.parser.ParserState;
......
355 354
				x.Accept(pid);
356 355
				x.type().Accept(ptype);
357 356

  
358
				final String key = x.type().kind() != TypeKind.QrType ? ptype.toString() : "qvar";
357
				final String key = ptype.toString();
359 358
				if (varlist.containsKey(key))
360 359
				{
361 360
					varlist.get(key).append(String.format(", %s", pid.toString()));

Also available in: Unified diff