aboutsummaryrefslogtreecommitdiff
path: root/frontend/syntax.dcl
diff options
context:
space:
mode:
authorjohnvg2013-04-09 14:51:23 +0000
committerjohnvg2013-04-09 14:51:23 +0000
commitcf7e0fea16182ced51f0acc1b98f7114d1e88e1b (patch)
tree4b8cbc73644f51f5d8b3f0ff4f619d9890782fd2 /frontend/syntax.dcl
parentin lazy record selector offsets for the garbage collector, swap the offsets, (diff)
optimize fusion, reduce memory used of fusion (from iTask branch):
allow integers and strings as consumer for generic functions (to optimize use of generic info). use PR_CurriedFunction instead of PR_Curried for local macro functions that are good producers. check the arity of the function to be generated already in determineProducer, if too large, don't yield a producer which will be rejected later, to allow optimization of producers in subsequent arguments. optimize trivial function calls (with arguments) before optimizing arguments, treat constant function as trivial function. if a function call has two identical arguments, generate a specialized function that shares these parameters. specialize functions with zero arity constructor arguments, if the function is a generic function, or the constructor is a generic constructor. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2232 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/syntax.dcl')
-rw-r--r--frontend/syntax.dcl9
1 files changed, 9 insertions, 0 deletions
diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl
index 563003e..b0a3ff9 100644
--- a/frontend/syntax.dcl
+++ b/frontend/syntax.dcl
@@ -663,6 +663,9 @@ FI_HasTypeSpec :== 2 // whether the function has u user defined type
FI_IsNonRecursive :== 4 // used in trans.icl and partition.icl
FI_IsUnboxedListOfRecordsConsOrNil :== 8
FI_MemberInstanceRequiresTypeInDefMod :== 16
+FI_GenericFun :== 32
+FI_Unused :== 64 // used in module trans
+FI_UnusedUsed :== 128 // used in module trans
:: FunInfo =
{ fi_calls :: ![FunCall]
@@ -866,6 +869,10 @@ cNotVarNumber :== -1
| PR_Curried !SymbIdent !Int
| PR_Unused
| PR_CurriedFunction !SymbIdent !Int !Index
+ | PR_String !{#Char}
+ | PR_Int !Int
+ | PR_Equal !Int
+ | PR_EqualRemove !Int
:: InstanceInfo = II_Empty | II_Node !{! Producer} !FunctionInfoPtr !InstanceInfo !InstanceInfo
@@ -1080,6 +1087,8 @@ cNotVarNumber :== -1
| TGenericFunctionInDictionary !(Global DefinedSymbol) !TypeKind !GlobalIndex /*GenericDict*/
+ | TLiftedSubst !Type // Auxiliary, used during fusion when generating a new function type
+
| TE
:: ConsVariable = CV !TypeVar