aboutsummaryrefslogtreecommitdiff
path: root/frontend/generics1.icl
AgeCommit message (Collapse)AuthorFilesLines
2014-09-26remove unused constructor TQV of :: type_io.icljohnvg1-2/+0
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2424 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-12-12add type attributes for universally quantified variables generated in the ↵johnvg1-5/+3
generics1 module to the list of all type attributes (not adding these type attributes caused a type error), this also happens for function types that are specified by the programmer, the universally quantified type variables are however not added to the list of all type variables git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2334 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-09optimize fusion, reduce memory used of fusion (from iTask branch):johnvg1-1/+4
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
2013-04-08add generic function dependencies for generic function definitions,johnvg1-610/+1494
add generic case definitions in definition modules for the types used to make the generic representation, in generic case definitions in definition modules specify what generic info and dependencies are used git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2227 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-05update derive class for deriving generic functions in class context (from ↵johnvg1-9/+11
iTask branch) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2226 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-05add derive class for deriving generic functions in class context (from iTask ↵johnvg1-47/+139
branch) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2225 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-05change type GenericCaseDef, add types GenericCaseFunctions and GCFjohnvg1-64/+73
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2224 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-04add type StringPos (from iTask branch)johnvg1-23/+22
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2223 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2013-04-04renumber functions after checking imported modules (from iTask branch)johnvg1-1/+5
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2222 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2012-12-03in function curryGenericArgType1 use TA_Multi while arguments have TA_Multi ↵johnvg1-0/+4
attribute, instead of only for first argument git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2192 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2012-10-24in the generic representation use RECORD instead of OBJECT and CONS for records,johnvg1-376/+434
change GenericInfo git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2191 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2012-08-14add extendable algebraic data types (merged from iTask branch)johnvg1-26/+25
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2149 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2012-08-02add pattern match test using =: in expressions,johnvg1-4/+6
add constructors PE_Matches and IsConstructor in module syntax git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2130 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-11-08rename module StdCompare to compare_typesjohnvg1-1/+1
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2017 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-11-08add import StdComparejohnvg1-1/+1
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2012 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-04-21use strictness annotations in instance member types,johnvg1-3/+5
add instance member types in definition modules git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1932 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-04-19use unique array select and update instead of replacejohnvg1-1/+1
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1930 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-04-18add instance declarations with a qualified class namejohnvg1-2/+2
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1928 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-04-15git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1926 ↵johnvg1-18/+9
1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-03-22recognize non generic variables in is_bimap_idjohnvg1-41/+51
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1889 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-03-21optimize adapters for generic functions using algebraic types which havejohnvg1-181/+404
constructors with only type variable arguments occurring at most once, these types can be optimized if they occur as an argument or result, or as an argument of such a type, of a generic function (and a generic variable is used by the type) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1886 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-03-17pass generic info only to instances for OBJECT, CONS and FIELD,johnvg1-236/+329
call instance functions for OBJECT, CONS and FIELD directly, with generic info git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1881 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-03-04remove shorthand and iso functions from generic ranges,johnvg1-168/+203
first all main instances are build, then all shorthand instances, shorthand instances directly call the main instance (SK_Function instead of SK_Generic), call toGeneric.. and fromGeneric.. functions directly if possible, instead of iso.. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1877 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-03-04remove unused index passed by foldArrayStjohnvg1-150/+83
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1874 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-02-28adapt arguments and result separately, instead of adapting the functionjohnvg1-17/+49
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1867 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-02-24git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1858 ↵johnvg1-17/+7
1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-02-23only generate a generic info argument for generic instances of kind *->*,johnvg1-194/+161
because OBJECT, CONS and FIELD have this kind and are the only types using generic info git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1855 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2011-02-11use ClassInstanceMember array for ins_members instead of DefinedSymbol array,johnvg1-71/+19
call exported generic instances directly git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1838 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2010-07-02pass Ident name instead of Ident to functions to create generic identsjohnvg1-13/+13
in genericsupport git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1790 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2010-05-07no messagejohnvg1-4/+1
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1785 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2010-05-07report an error if a generic instance is derived for a type with anjohnvg1-33/+41
existential or universal quantifier git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1784 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2010-02-05add optimizations for generic bimap,johnvg1-159/+931
add bimap instances for standard generic types to compiler git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1764 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2010-02-05make local build_ functions globaljohnvg1-73/+88
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1763 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2010-02-05use record FunsAndGroups instead of a tuplejohnvg1-223/+79
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1762 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2010-02-04make generic info lazy to improve fusion results,johnvg1-65/+19
change toGenericFrom and fromGenericto to fromGeneric and toGeneric git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1761 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2010-02-04fix bug in foldExpr for @, first expression was used twicejohnvg1-50/+16
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1760 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2010-02-04remove unused codejohnvg1-235/+3
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1759 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2008-10-28remove fields gen_cases and gen_star_cases because they are notjohnvg1-5/+1
used and may cause the compiler to crash if generic definitions and instances occur on a cycle of definition modules git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1702 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2007-12-20update ft_arity of generated dcl functions, if this field is not updated, fusionjohnvg1-5/+3
can crash because arguments can be incorrectly analyzed as unused git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1693 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2007-09-05use an integer instead of a string in GenTypeVarjohnvg1-14/+23
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1685 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2007-09-05use bimapId instead of bimap{|*|} for variablesjohnvg1-10/+23
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1684 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2007-04-11rename field cons_index as cons_numberjohnvg1-2/+2
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1665 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2007-02-14add space before and after @johnvg1-1/+1
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1648 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2006-11-16report an error if an existential type is usedjohnvg1-6/+9
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1627 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2006-07-17substitute TA_RootVar when expanding type synonymsjohnvg1-1/+6
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1603 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2005-11-21remove unused constructor WildCardjohnvg1-2/+0
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1567 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2005-11-18correct the arities in the 'incorrect arity' error messagejohnvg1-9/+5
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1561 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2005-04-22remove code for Clean 1.3johnvg1-6/+0
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1538 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2005-04-21remove unused variable generated_arg_namesjohnvg1-2/+0
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1534 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
2003-07-15OBJECT marking is addedalimarin1-28/+163
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1368 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d