diff --git a/Makefile.rules b/Makefile.rules index 0705c31282..c26fb29497 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -34,7 +34,6 @@ SOURCES = SOURCES += src/ariths.c SOURCES += src/blister.c SOURCES += src/bool.c -SOURCES += src/c_methsel1.c SOURCES += src/c_oper1.c SOURCES += src/c_type1.c SOURCES += src/calls.c @@ -420,7 +419,6 @@ else DOCOMP_PREFIX = $(abs_srcdir) endif docomp: #gap$(EXEEXT) - @"$(abs_srcdir)"/cnf/GAP-C-GEN $(abs_srcdir)/lib $(abs_srcdir)/src methsel1 ./gap$(EXEEXT) @"$(abs_srcdir)"/cnf/GAP-C-GEN $(abs_srcdir)/lib $(DOCOMP_PREFIX)/src oper1 ./gap$(EXEEXT) @"$(abs_srcdir)"/cnf/GAP-C-GEN $(abs_srcdir)/lib $(DOCOMP_PREFIX)/src type1 ./gap$(EXEEXT) diff --git a/cnf/gac.in b/cnf/gac.in index ac7d469927..b0d37a1514 100644 --- a/cnf/gac.in +++ b/cnf/gac.in @@ -317,7 +317,6 @@ make_compstat () { echo "#include " echo "#ifndef AVOID_PRECOMPILED" - echo "extern StructInitInfo * Init__methsel1 ( void );" echo "extern StructInitInfo * Init__type1 ( void );" echo "extern StructInitInfo * Init__oper1( void );" echo "#endif" @@ -328,7 +327,6 @@ make_compstat () { echo "InitInfoFunc CompInitFuncs [] = {" echo "#ifndef AVOID_PRECOMPILED" - echo " Init__methsel1," echo " Init__type1," echo " Init__oper1," echo "#endif" diff --git a/dev/MAINTAINERS b/dev/MAINTAINERS index ee48521f2b..f5b58940f1 100644 --- a/dev/MAINTAINERS +++ b/dev/MAINTAINERS @@ -251,7 +251,6 @@ the corresponding modules and their maintainers, as given in dev/MODULES meatauto.gi meataxe.gd meataxe.gi - methsel1.g methsel2.g methsel.g methwhy.g diff --git a/lib/methsel.g b/lib/methsel.g index e2ea53d18a..074a63bb28 100644 --- a/lib/methsel.g +++ b/lib/methsel.g @@ -8,26 +8,51 @@ #Y (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland #Y Copyright (C) 2002 The GAP Group ## -## This file defines the less frequently used functions to -## select methods. More frequently used functions are in methsel1.g, which -## is compiled in the default setup +## This file defines the less frequently used functions to select +## methods. More frequently used functions used to be in methsel1.g, +## which was compiled in the default setup; this code has now been +## replaced by hand written C code in the kernel. ## ############################################################################# ## - #F # # # # # # # # # # # # # method selection # # # # # # # # # # # # # # # ## - ############################################################################# ## +#F AttributeValueNotSet( , ) +## +AttributeValueNotSet := function(attr,obj) +local type,fam,methods,i,flag,erg; + type:=TypeObj(obj); + fam:=FamilyObj(obj); + methods:=METHODS_OPERATION(attr,1); + for i in [1..LEN_LIST(methods)/5] do +# nam:=methods[5*(i-1)+5]; # name + flag:=true; + flag:=flag and IS_SUBSET_FLAGS(type![2],methods[5*(i-1)+2]); + if flag then + flag:=flag and methods[5*(i-1)+1](fam); + fi; + if flag then + attr:=methods[5*(i-1)+3]; + erg:=attr(obj); + if not IS_IDENTICAL_OBJ(erg,TRY_NEXT_METHOD) then + return erg; + fi; + fi; + od; + Error("No applicable method found for attribute"); +end; + +############################################################################# +## #F # # # # # # # # # # # verbose method selection # # # # # # # # # # # # # ## - VMETHOD_PRINT_INFO := function ( methods, i, arity) local offset; offset := (arity+4)*(i-1)+arity; @@ -42,177 +67,6 @@ end; ############################################################################# ## - -#F VMETHOD_0ARGS -## -VMETHOD_0ARGS := function ( operation ) - local methods, i; - - methods := METHODS_OPERATION( operation, 0 ); - for i in [1..LEN_LIST(methods)/4] do - if methods[4*(i-1)+1]() - then - VMETHOD_PRINT_INFO(methods, i, 0); - return methods[4*(i-1)+2]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VMETHOD_1ARGS -## -VMETHOD_1ARGS := function ( operation, type1 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 1 ); - for i in [1..LEN_LIST(methods)/5] do - if IS_SUBSET_FLAGS( type1![2], methods[5*(i-1)+2] ) - and methods[5*(i-1)+1]( type1![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 1); - return methods[5*(i-1)+3]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VMETHOD_2ARGS -## -VMETHOD_2ARGS := function ( operation, type1, type2 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 2 ); - for i in [1..LEN_LIST(methods)/6] do - if IS_SUBSET_FLAGS( type1![2], methods[6*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[6*(i-1)+3] ) - and methods[6*(i-1)+1]( type1![1], type2![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 2); - return methods[6*(i-1)+4]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VMETHOD_3ARGS -## -VMETHOD_3ARGS := function ( operation, type1, type2, type3 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 3 ); - for i in [1..LEN_LIST(methods)/7] do - if IS_SUBSET_FLAGS( type1![2], methods[7*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[7*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[7*(i-1)+4] ) - and methods[7*(i-1)+1]( type1![1], type2![1], type3![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 3); - return methods[7*(i-1)+5]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VMETHOD_4ARGS -## -VMETHOD_4ARGS := function ( operation, type1, type2, type3, - type4 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 4 ); - for i in [1..LEN_LIST(methods)/8] do - if IS_SUBSET_FLAGS( type1![2], methods[8*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[8*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[8*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[8*(i-1)+5] ) - and methods[8*(i-1)+1]( type1![1], type2![1], type3![1], - type4![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 4); - return methods[8*(i-1)+6]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VMETHOD_5ARGS -## -VMETHOD_5ARGS := function ( operation, type1, type2, type3, - type4, type5 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 5 ); - for i in [1..LEN_LIST(methods)/9] do - if IS_SUBSET_FLAGS( type1![2], methods[9*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[9*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[9*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[9*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9*(i-1)+6] ) - and methods[9*(i-1)+1]( type1![1], type2![1], type3![1], - type4![1], type5![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 5); - return methods[9*(i-1)+7]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VMETHOD_6ARGS -## -VMETHOD_6ARGS := function ( operation, type1, type2, type3, - type4, type5, type6 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 6 ); - for i in [1..LEN_LIST(methods)/10] do - if IS_SUBSET_FLAGS( type1![2], methods[10*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[10*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[10*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[10*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10*(i-1)+6] ) - and IS_SUBSET_FLAGS( type6![2], methods[10*(i-1)+7] ) - and methods[10*(i-1)+1]( type1![1], type2![1], type3![1], - type4![1], type5![1], type6![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 6); - return methods[10*(i-1)+8]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VMETHOD_XARGS -## -VMETHOD_XARGS := function(arg) - Error( "not supported yet" ); -end; - - -############################################################################# -## - #F # # # # # # # # # # # verbose try next method # # # # # # # # # # # # # ## NEXT_VMETHOD_PRINT_INFO := function ( methods, i, arity) @@ -228,608 +82,6 @@ NEXT_VMETHOD_PRINT_INFO := function ( methods, i, arity) end; -############################################################################# -## - -#F NEXT_VMETHOD_0ARGS -## -NEXT_VMETHOD_0ARGS := function ( operation, k ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 0 ); - j := 0; - for i in [1..LEN_LIST(methods)/4] do - if methods[4*(i-1)+1]() - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 0); - return methods[4*(i-1)+2]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VMETHOD_1ARGS -## -NEXT_VMETHOD_1ARGS := function ( operation, k, type1 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 1 ); - j := 0; - for i in [1..LEN_LIST(methods)/5] do - if IS_SUBSET_FLAGS( type1![2], methods[5*(i-1)+2] ) - and methods[5*(i-1)+1]( type1![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 1); - return methods[5*(i-1)+3]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VMETHOD_2ARGS -## -NEXT_VMETHOD_2ARGS := function ( operation, k, type1, type2 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 2 ); - j := 0; - for i in [1..LEN_LIST(methods)/6] do - if IS_SUBSET_FLAGS( type1![2], methods[6*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[6*(i-1)+3] ) - and methods[6*(i-1)+1]( type1![1], type2![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 2); - return methods[6*(i-1)+4]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VMETHOD_3ARGS -## -NEXT_VMETHOD_3ARGS := function ( operation, k, type1, type2, type3 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 3 ); - j := 0; - for i in [1..LEN_LIST(methods)/7] do - if IS_SUBSET_FLAGS( type1![2], methods[7*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[7*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[7*(i-1)+4] ) - and methods[7*(i-1)+1]( type1![1], type2![1], type3![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 3); - return methods[7*(i-1)+5]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VMETHOD_4ARGS -## -NEXT_VMETHOD_4ARGS := function ( operation, k, type1, type2, type3, - type4 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 4 ); - j := 0; - for i in [1..LEN_LIST(methods)/8] do - if IS_SUBSET_FLAGS( type1![2], methods[8*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[8*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[8*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[8*(i-1)+5] ) - and methods[8*(i-1)+1]( type1![1], type2![1], type3![1], - type4![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 4); - return methods[8*(i-1)+6]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VMETHOD_5ARGS -## -NEXT_VMETHOD_5ARGS := function ( operation, k, type1, type2, type3, - type4, type5 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 5 ); - j := 0; - for i in [1..LEN_LIST(methods)/9] do - if IS_SUBSET_FLAGS( type1![2], methods[9*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[9*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[9*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[9*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9*(i-1)+6] ) - and methods[9*(i-1)+1]( type1![1], type2![1], type3![1], - type4![1], type5![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 5); - return methods[9*(i-1)+7]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VMETHOD_6ARGS -## -NEXT_VMETHOD_6ARGS := function ( operation, k, type1, type2, type3, - type4, type5, type6 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 6 ); - j := 0; - for i in [1..LEN_LIST(methods)/10] do - if IS_SUBSET_FLAGS( type1![2], methods[10*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[10*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[10*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[10*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10*(i-1)+6] ) - and IS_SUBSET_FLAGS( type6![2], methods[10*(i-1)+7] ) - and methods[10*(i-1)+1]( type1![1], type2![1], type3![1], - type4![1], type5![1], type6![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 6); - return methods[10*(i-1)+8]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VMETHOD_XARGS -## -NEXT_VMETHOD_XARGS := function(arg) - Error( "not supported yet" ); -end; - - -############# -# - - - - - -############################################################################# -## - -#F # # # # # # # # # # verbose constructor selection # # # # # # # # # # # -## - - -############################################################################# -## - -#F VCONSTRUCTOR_0ARGS -## -VCONSTRUCTOR_0ARGS := function ( operation ) - local methods, i; - - methods := METHODS_OPERATION( operation, 0 ); - for i in [1..LEN_LIST(methods)/4] do - if methods[4*(i-1)+1]() - then - VMETHOD_PRINT_INFO(methods, i, 0); - return methods[4*(i-1)+2]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VCONSTRUCTOR_1ARGS -## -VCONSTRUCTOR_1ARGS := function ( operation, flags1 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 1 ); - for i in [1..LEN_LIST(methods)/5] do - if IS_SUBSET_FLAGS( methods[5*(i-1)+2], flags1 ) - and methods[5*(i-1)+1]( flags1 ) - then - VMETHOD_PRINT_INFO(methods, i, 1); - return methods[5*(i-1)+3]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VCONSTRUCTOR_2ARGS -## -VCONSTRUCTOR_2ARGS := function ( operation, flags1, type2 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 2 ); - for i in [1..LEN_LIST(methods)/6] do - if IS_SUBSET_FLAGS( methods[6*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[6*(i-1)+3] ) - and methods[6*(i-1)+1]( flags1, type2![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 2); - return methods[6*(i-1)+4]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VCONSTRUCTOR_3ARGS -## -VCONSTRUCTOR_3ARGS := function ( operation, flags1, type2, type3 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 3 ); - for i in [1..LEN_LIST(methods)/7] do - if IS_SUBSET_FLAGS( methods[7*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[7*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[7*(i-1)+4] ) - and methods[7*(i-1)+1]( flags1, type2![1], type3![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 3); - return methods[7*(i-1)+5]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VCONSTRUCTOR_4ARGS -## -VCONSTRUCTOR_4ARGS := function ( operation, flags1, type2, type3, - type4 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 4 ); - for i in [1..LEN_LIST(methods)/8] do - if IS_SUBSET_FLAGS( methods[8*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[8*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[8*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[8*(i-1)+5] ) - and methods[8*(i-1)+1]( flags1, type2![1], type3![1], - type4![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 4); - return methods[8*(i-1)+6]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VCONSTRUCTOR_5ARGS -## -VCONSTRUCTOR_5ARGS := function ( operation, flags1, type2, type3, - type4, type5 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 5 ); - for i in [1..LEN_LIST(methods)/9] do - if IS_SUBSET_FLAGS( methods[9*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[9*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[9*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[9*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9*(i-1)+6] ) - and methods[9*(i-1)+1]( flags1, type2![1], type3![1], - type4![1], type5![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 5); - return methods[9*(i-1)+7]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VCONSTRUCTOR_6ARGS -## -VCONSTRUCTOR_6ARGS := function ( operation, flags1, type2, type3, - type4, type5, type6 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 6 ); - for i in [1..LEN_LIST(methods)/10] do - if IS_SUBSET_FLAGS( methods[10*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[10*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[10*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[10*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10*(i-1)+6] ) - and IS_SUBSET_FLAGS( type6![2], methods[10*(i-1)+7] ) - and methods[10*(i-1)+1]( flags1, type2![1], type3![1], - type4![1], type5![1], type6![1] ) - then - VMETHOD_PRINT_INFO(methods, i, 6); - return methods[10*(i-1)+8]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F VCONSTRUCTOR_XARGS -## -VCONSTRUCTOR_XARGS := function(arg) - Error( "not supported yet" ); -end; - - -############################################################################# -## - -#F # # # # # # # # # # verbose try next constructor # # # # # # # # # # # # -## - - - -############################################################################# -## - -#F NEXT_VCONSTRUCTOR_0ARGS -## -NEXT_VCONSTRUCTOR_0ARGS := function ( operation, k ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 0 ); - j := 0; - for i in [1..LEN_LIST(methods)/4] do - if methods[4*(i-1)+1]() - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 0); - return methods[4*(i-1)+2]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VCONSTRUCTOR_1ARGS -## -NEXT_VCONSTRUCTOR_1ARGS := function ( operation, k, flags1 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 1 ); - j := 0; - for i in [1..LEN_LIST(methods)/5] do - if IS_SUBSET_FLAGS( methods[5*(i-1)+2], flags1 ) - and methods[5*(i-1)+1]( flags1 ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 1); - return methods[5*(i-1)+3]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VCONSTRUCTOR_2ARGS -## -NEXT_VCONSTRUCTOR_2ARGS := function ( operation, k, flags1, type2 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 2 ); - j := 0; - for i in [1..LEN_LIST(methods)/6] do - if IS_SUBSET_FLAGS( methods[6*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[6*(i-1)+3] ) - and methods[6*(i-1)+1]( flags1, type2![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 2); - return methods[6*(i-1)+4]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VCONSTRUCTOR_3ARGS -## -NEXT_VCONSTRUCTOR_3ARGS := function ( operation, k, flags1, type2, type3 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 3 ); - j := 0; - for i in [1..LEN_LIST(methods)/7] do - if IS_SUBSET_FLAGS( methods[7*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[7*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[7*(i-1)+4] ) - and methods[7*(i-1)+1]( flags1, type2![1], type3![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 3); - return methods[7*(i-1)+5]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VCONSTRUCTOR_4ARGS -## -NEXT_VCONSTRUCTOR_4ARGS := function ( operation, k, flags1, type2, type3, - type4 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 4 ); - j := 0; - for i in [1..LEN_LIST(methods)/8] do - if IS_SUBSET_FLAGS( methods[8*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[8*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[8*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[8*(i-1)+5] ) - and methods[8*(i-1)+1]( flags1, type2![1], type3![1], - type4![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 4); - return methods[8*(i-1)+6]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VCONSTRUCTOR_5ARGS -## -NEXT_VCONSTRUCTOR_5ARGS := function ( operation, k, flags1, type2, type3, - type4, type5 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 5 ); - j := 0; - for i in [1..LEN_LIST(methods)/9] do - if IS_SUBSET_FLAGS( methods[9*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[9*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[9*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[9*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9*(i-1)+6] ) - and methods[9*(i-1)+1]( flags1, type2![1], type3![1], - type4![1], type5![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 5); - return methods[9*(i-1)+7]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VCONSTRUCTOR_6ARGS -## -NEXT_VCONSTRUCTOR_6ARGS := function ( operation, k, flags1, type2, type3, - type4, type5, type6 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 6 ); - j := 0; - for i in [1..LEN_LIST(methods)/10] do - if IS_SUBSET_FLAGS( methods[10*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[10*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[10*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[10*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10*(i-1)+6] ) - and IS_SUBSET_FLAGS( type6![2], methods[10*(i-1)+7] ) - and methods[10*(i-1)+1]( flags1, type2![1], type3![1], - type4![1], type5![1], type6![1] ) - then - if k = j then - NEXT_VMETHOD_PRINT_INFO(methods, i, 6); - return methods[10*(i-1)+8]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_VCONSTRUCTOR_XARGS -## -NEXT_VCONSTRUCTOR_XARGS := function(arg) - Error( "not supported yet" ); -end; - - ############################################################################# ## #E methsel.g . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/lib/methsel1.g b/lib/methsel1.g deleted file mode 100644 index e1b568e6f5..0000000000 --- a/lib/methsel1.g +++ /dev/null @@ -1,784 +0,0 @@ -############################################################################# -## -#W methsel1.g GAP library Steve Linton -## -## -#Y Copyright (C) 1996, Lehrstuhl D für Mathematik, RWTH Aachen, Germany -#Y (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland -#Y Copyright (C) 2002 The GAP Group -## -## This file defines the more frequently used functions to -## select methods. Less frequently used functions are in methsel1.g, which -## is not compiled in the default setup. See also methsel2.g -## - -############################################################################# -## -#F METHOD_0ARGS -## -METHOD_0ARGS := function ( operation ) - local methods, i; - - methods := METHODS_OPERATION( operation, 0 ); - for i in [1,5..LEN_LIST(methods)-3] do - if methods[i]() - then - return methods[i+1]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F METHOD_1ARGS -## -METHOD_1ARGS := function ( operation, type1 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 1 ); - for i in [1,6..LEN_LIST(methods)-4] do - if IS_SUBSET_FLAGS( type1![2], methods[i+1] ) - and methods[i]( type1![1] ) - then - return methods[i+2]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F METHOD_2ARGS -## -METHOD_2ARGS := function ( operation, type1, type2 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 2 ); - for i in [1,7..LEN_LIST(methods)-5] do - if IS_SUBSET_FLAGS( type1![2], methods[i+1] ) - and IS_SUBSET_FLAGS( type2![2], methods[i+2] ) - and methods[i]( type1![1], type2![1] ) - then - return methods[i+3]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F METHOD_3ARGS -## -METHOD_3ARGS := function ( operation, type1, type2, type3 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 3 ); - for i in [1,8..LEN_LIST(methods)-6] do - if IS_SUBSET_FLAGS( type1![2], methods[i+1] ) - and IS_SUBSET_FLAGS( type2![2], methods[i+2] ) - and IS_SUBSET_FLAGS( type3![2], methods[i+3] ) - and methods[i]( type1![1], type2![1], type3![1] ) - then - return methods[i+4]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F METHOD_4ARGS -## -METHOD_4ARGS := function ( operation, type1, type2, type3, - type4 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 4 ); - for i in [1,9..LEN_LIST(methods)-7] do - if IS_SUBSET_FLAGS( type1![2], methods[i+1] ) - and IS_SUBSET_FLAGS( type2![2], methods[i+2] ) - and IS_SUBSET_FLAGS( type3![2], methods[i+3] ) - and IS_SUBSET_FLAGS( type4![2], methods[i+4] ) - and methods[i]( type1![1], type2![1], type3![1], - type4![1] ) - then - return methods[i+5]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F METHOD_5ARGS -## -METHOD_5ARGS := function ( operation, type1, type2, type3, - type4, type5 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 5 ); - for i in [1,10..LEN_LIST(methods)-8] do - if IS_SUBSET_FLAGS( type1![2], methods[i+1] ) - and IS_SUBSET_FLAGS( type2![2], methods[i+2] ) - and IS_SUBSET_FLAGS( type3![2], methods[i+3] ) - and IS_SUBSET_FLAGS( type4![2], methods[i+4] ) - and IS_SUBSET_FLAGS( type5![2], methods[i+5] ) - and methods[i]( type1![1], type2![1], type3![1], - type4![1], type5![1] ) - then - return methods[i+6]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F METHOD_6ARGS -## -METHOD_6ARGS := function ( operation, type1, type2, type3, - type4, type5, type6 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 6 ); - for i in [1,11..LEN_LIST(methods)-9] do - if IS_SUBSET_FLAGS( type1![2], methods[i+1] ) - and IS_SUBSET_FLAGS( type2![2], methods[i+2] ) - and IS_SUBSET_FLAGS( type3![2], methods[i+3] ) - and IS_SUBSET_FLAGS( type4![2], methods[i+4] ) - and IS_SUBSET_FLAGS( type5![2], methods[i+5] ) - and IS_SUBSET_FLAGS( type6![2], methods[i+6] ) - and methods[i]( type1![1], type2![1], type3![1], - type4![1], type5![1], type6![1] ) - then - return methods[i+7]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F METHOD_XARGS -## -METHOD_XARGS := function(arg) - Error( "not supported yet" ); -end; - - -############################################################################# -## - -#F # # # # # # # # # # # # # try next method # # # # # # # # # # # # # # # -## - - -############################################################################# -## - -#F NEXT_METHOD_0ARGS -## -NEXT_METHOD_0ARGS := function ( operation, k ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 0 ); - j := 0; - for i in [1..LEN_LIST(methods)/4] do - if methods[4*(i-1)+1]() - then - if k = j then - return methods[4*(i-1)+2]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_METHOD_1ARGS -## -NEXT_METHOD_1ARGS := function ( operation, k, type1 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 1 ); - j := 0; - for i in [1..LEN_LIST(methods)/5] do - if IS_SUBSET_FLAGS( type1![2], methods[5*(i-1)+2] ) - and methods[5*(i-1)+1]( type1![1] ) - then - if k = j then - return methods[5*(i-1)+3]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_METHOD_2ARGS -## -NEXT_METHOD_2ARGS := function ( operation, k, type1, type2 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 2 ); - j := 0; - for i in [1..LEN_LIST(methods)/6] do - if IS_SUBSET_FLAGS( type1![2], methods[6*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[6*(i-1)+3] ) - and methods[6*(i-1)+1]( type1![1], type2![1] ) - then - if k = j then - return methods[6*(i-1)+4]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_METHOD_3ARGS -## -NEXT_METHOD_3ARGS := function ( operation, k, type1, type2, type3 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 3 ); - j := 0; - for i in [1..LEN_LIST(methods)/7] do - if IS_SUBSET_FLAGS( type1![2], methods[7*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[7*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[7*(i-1)+4] ) - and methods[7*(i-1)+1]( type1![1], type2![1], type3![1] ) - then - if k = j then - return methods[7*(i-1)+5]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_METHOD_4ARGS -## -NEXT_METHOD_4ARGS := function ( operation, k, type1, type2, type3, - type4 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 4 ); - j := 0; - for i in [1..LEN_LIST(methods)/8] do - if IS_SUBSET_FLAGS( type1![2], methods[8*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[8*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[8*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[8*(i-1)+5] ) - and methods[8*(i-1)+1]( type1![1], type2![1], type3![1], - type4![1] ) - then - if k = j then - return methods[8*(i-1)+6]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_METHOD_5ARGS -## -NEXT_METHOD_5ARGS := function ( operation, k, type1, type2, type3, - type4, type5 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 5 ); - j := 0; - for i in [1..LEN_LIST(methods)/9] do - if IS_SUBSET_FLAGS( type1![2], methods[9*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[9*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[9*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[9*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9*(i-1)+6] ) - and methods[9*(i-1)+1]( type1![1], type2![1], type3![1], - type4![1], type5![1] ) - then - if k = j then - return methods[9*(i-1)+7]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_METHOD_6ARGS -## -NEXT_METHOD_6ARGS := function ( operation, k, type1, type2, type3, - type4, type5, type6 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 6 ); - j := 0; - for i in [1..LEN_LIST(methods)/10] do - if IS_SUBSET_FLAGS( type1![2], methods[10*(i-1)+2] ) - and IS_SUBSET_FLAGS( type2![2], methods[10*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[10*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[10*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10*(i-1)+6] ) - and IS_SUBSET_FLAGS( type6![2], methods[10*(i-1)+7] ) - and methods[10*(i-1)+1]( type1![1], type2![1], type3![1], - type4![1], type5![1], type6![1] ) - then - if k = j then - return methods[10*(i-1)+8]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_METHOD_XARGS -## -NEXT_METHOD_XARGS := function(arg) - Error( "not supported yet" ); -end; - -############################################################################# -## -#F AttributeValueNotSet( , ) -## -AttributeValueNotSet := function(attr,obj) -local type,fam,methods,i,flag,erg; - type:=TypeObj(obj); - fam:=FamilyObj(obj); - methods:=METHODS_OPERATION(attr,1); - for i in [1..LEN_LIST(methods)/5] do -# nam:=methods[5*(i-1)+5]; # name - flag:=true; - flag:=flag and IS_SUBSET_FLAGS(type![2],methods[5*(i-1)+2]); - if flag then - flag:=flag and methods[5*(i-1)+1](fam); - fi; - if flag then - attr:=methods[5*(i-1)+3]; - erg:=attr(obj); - if not IS_IDENTICAL_OBJ(erg,TRY_NEXT_METHOD) then - return erg; - fi; - fi; - od; - Error("No applicable method found for attribute"); -end; - -############################################################################# -## -#F # # # # # # # # # # # # constructor selection # # # # # # # # # # # # # -## - - -############################################################################# -## - -#F CONSTRUCTOR_0ARGS -## -CONSTRUCTOR_0ARGS := function ( operation ) - local methods, i; - - methods := METHODS_OPERATION( operation, 0 ); - for i in [1..LEN_LIST(methods)/4] do - if methods[4*(i-1)+1]() - then - return methods[4*(i-1)+2]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F CONSTRUCTOR_1ARGS -## -CONSTRUCTOR_1ARGS := function ( operation, flags1 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 1 ); - for i in [1..LEN_LIST(methods)/5] do - if IS_SUBSET_FLAGS( methods[5*(i-1)+2], flags1 ) - and methods[5*(i-1)+1]( flags1 ) - then - return methods[5*(i-1)+3]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F CONSTRUCTOR_2ARGS -## -CONSTRUCTOR_2ARGS := function ( operation, flags1, type2 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 2 ); - for i in [1..LEN_LIST(methods)/6] do - if IS_SUBSET_FLAGS( methods[6*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[6*(i-1)+3] ) - and methods[6*(i-1)+1]( flags1, type2![1] ) - then - return methods[6*(i-1)+4]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F CONSTRUCTOR_3ARGS -## -CONSTRUCTOR_3ARGS := function ( operation, flags1, type2, type3 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 3 ); - for i in [1..LEN_LIST(methods)/7] do - if IS_SUBSET_FLAGS( methods[7*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[7*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[7*(i-1)+4] ) - and methods[7*(i-1)+1]( flags1, type2![1], type3![1] ) - then - return methods[7*(i-1)+5]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F CONSTRUCTOR_4ARGS -## -CONSTRUCTOR_4ARGS := function ( operation, flags1, type2, type3, - type4 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 4 ); - for i in [1..LEN_LIST(methods)/8] do - if IS_SUBSET_FLAGS( methods[8*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[8*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[8*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[8*(i-1)+5] ) - and methods[8*(i-1)+1]( flags1, type2![1], type3![1], - type4![1] ) - then - return methods[8*(i-1)+6]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F CONSTRUCTOR_5ARGS -## -CONSTRUCTOR_5ARGS := function ( operation, flags1, type2, type3, - type4, type5 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 5 ); - for i in [1..LEN_LIST(methods)/9] do - if IS_SUBSET_FLAGS( methods[9*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[9*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[9*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[9*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9*(i-1)+6] ) - and methods[9*(i-1)+1]( flags1, type2![1], type3![1], - type4![1], type5![1] ) - then - return methods[9*(i-1)+7]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F CONSTRUCTOR_6ARGS -## -CONSTRUCTOR_6ARGS := function ( operation, flags1, type2, type3, - type4, type5, type6 ) - local methods, i; - - methods := METHODS_OPERATION( operation, 6 ); - for i in [1..LEN_LIST(methods)/10] do - if IS_SUBSET_FLAGS( methods[10*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[10*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[10*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[10*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10*(i-1)+6] ) - and IS_SUBSET_FLAGS( type6![2], methods[10*(i-1)+7] ) - and methods[10*(i-1)+1]( flags1, type2![1], type3![1], - type4![1], type5![1], type6![1] ) - then - return methods[10*(i-1)+8]; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F CONSTRUCTOR_XARGS -## -CONSTRUCTOR_XARGS := function(arg) - Error( "not supported yet" ); -end; - - -############################################################################# -## - -#F # # # # # # # # # # # # try next constructor # # # # # # # # # # # # # # -## - - -############################################################################# -## - -#F NEXT_CONSTRUCTOR_0ARGS -## -NEXT_CONSTRUCTOR_0ARGS := function ( operation, k ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 0 ); - j := 0; - for i in [1..LEN_LIST(methods)/4] do - if methods[4*(i-1)+1]() - then - if k = j then - return methods[4*(i-1)+2]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_CONSTRUCTOR_1ARGS -## -NEXT_CONSTRUCTOR_1ARGS := function ( operation, k, flags1 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 1 ); - j := 0; - for i in [1..LEN_LIST(methods)/5] do - if IS_SUBSET_FLAGS( methods[5*(i-1)+2], flags1 ) - and methods[5*(i-1)+1]( flags1 ) - then - if k = j then - return methods[5*(i-1)+3]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_CONSTRUCTOR_2ARGS -## -NEXT_CONSTRUCTOR_2ARGS := function ( operation, k, flags1, type2 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 2 ); - j := 0; - for i in [1..LEN_LIST(methods)/6] do - if IS_SUBSET_FLAGS( methods[6*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[6*(i-1)+3] ) - and methods[6*(i-1)+1]( flags1, type2![1] ) - then - if k = j then - return methods[6*(i-1)+4]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_CONSTRUCTOR_3ARGS -## -NEXT_CONSTRUCTOR_3ARGS := function ( operation, k, flags1, type2, type3 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 3 ); - j := 0; - for i in [1..LEN_LIST(methods)/7] do - if IS_SUBSET_FLAGS( methods[7*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[7*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[7*(i-1)+4] ) - and methods[7*(i-1)+1]( flags1, type2![1], type3![1] ) - then - if k = j then - return methods[7*(i-1)+5]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_CONSTRUCTOR_4ARGS -## -NEXT_CONSTRUCTOR_4ARGS := function ( operation, k, flags1, type2, type3, - type4 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 4 ); - j := 0; - for i in [1..LEN_LIST(methods)/8] do - if IS_SUBSET_FLAGS( methods[8*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[8*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[8*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[8*(i-1)+5] ) - and methods[8*(i-1)+1]( flags1, type2![1], type3![1], - type4![1] ) - then - if k = j then - return methods[8*(i-1)+6]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_CONSTRUCTOR_5ARGS -## -NEXT_CONSTRUCTOR_5ARGS := function ( operation, k, flags1, type2, type3, - type4, type5 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 5 ); - j := 0; - for i in [1..LEN_LIST(methods)/9] do - if IS_SUBSET_FLAGS( methods[9*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[9*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[9*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[9*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9*(i-1)+6] ) - and methods[9*(i-1)+1]( flags1, type2![1], type3![1], - type4![1], type5![1] ) - then - if k = j then - return methods[9*(i-1)+7]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_CONSTRUCTOR_6ARGS -## -NEXT_CONSTRUCTOR_6ARGS := function ( operation, k, flags1, type2, type3, - type4, type5, type6 ) - local methods, i, j; - - methods := METHODS_OPERATION( operation, 6 ); - j := 0; - for i in [1..LEN_LIST(methods)/10] do - if IS_SUBSET_FLAGS( methods[10*(i-1)+2], flags1 ) - and IS_SUBSET_FLAGS( type2![2], methods[10*(i-1)+3] ) - and IS_SUBSET_FLAGS( type3![2], methods[10*(i-1)+4] ) - and IS_SUBSET_FLAGS( type4![2], methods[10*(i-1)+5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10*(i-1)+6] ) - and IS_SUBSET_FLAGS( type6![2], methods[10*(i-1)+7] ) - and methods[10*(i-1)+1]( flags1, type2![1], type3![1], - type4![1], type5![1], type6![1] ) - then - if k = j then - return methods[10*(i-1)+8]; - else - j := j + 1; - fi; - fi; - od; - return fail; -end; - - -############################################################################# -## -#F NEXT_CONSTRUCTOR_XARGS -## -NEXT_CONSTRUCTOR_XARGS := function(arg) - Error( "not supported yet" ); -end; - -############################################################################# -## -#E methsel1.g . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here -## diff --git a/lib/methsel2.g b/lib/methsel2.g index 967db92158..09302d6194 100644 --- a/lib/methsel2.g +++ b/lib/methsel2.g @@ -11,7 +11,7 @@ ## ## This file defines some functions associated with method selection, ## which do not need to be compiled by default. More performance critical -## functions are found in methsel1.g +## functions are implemented in the kernel. ## diff --git a/lib/read1.g b/lib/read1.g index a360f1c4bd..831ca8981b 100644 --- a/lib/read1.g +++ b/lib/read1.g @@ -10,7 +10,6 @@ ReadLib( "oper1.g" ); ReadLib( "type.g" ); ReadLib( "type1.g" ); ReadLib( "methsel.g" ); -ReadLib( "methsel1.g" ); ReadLib( "methsel2.g" ); ReadLib( "random.g" ); diff --git a/src/c_methsel1.c b/src/c_methsel1.c deleted file mode 100644 index 3672eab4aa..0000000000 --- a/src/c_methsel1.c +++ /dev/null @@ -1,5687 +0,0 @@ -#ifndef AVOID_PRECOMPILED -/* C file produced by GAC */ -#include -#define FILE_CRC "102657344" - -/* global variables used in handlers */ -static GVar G_METHOD__0ARGS; -static GVar G_METHOD__1ARGS; -static GVar G_METHOD__2ARGS; -static GVar G_METHOD__3ARGS; -static GVar G_METHOD__4ARGS; -static GVar G_METHOD__5ARGS; -static GVar G_METHOD__6ARGS; -static GVar G_NEXT__METHOD__0ARGS; -static GVar G_NEXT__METHOD__1ARGS; -static GVar G_NEXT__METHOD__2ARGS; -static GVar G_NEXT__METHOD__3ARGS; -static GVar G_NEXT__METHOD__4ARGS; -static GVar G_NEXT__METHOD__5ARGS; -static GVar G_NEXT__METHOD__6ARGS; -static GVar G_CONSTRUCTOR__0ARGS; -static GVar G_CONSTRUCTOR__1ARGS; -static GVar G_CONSTRUCTOR__2ARGS; -static GVar G_CONSTRUCTOR__3ARGS; -static GVar G_CONSTRUCTOR__4ARGS; -static GVar G_CONSTRUCTOR__5ARGS; -static GVar G_CONSTRUCTOR__6ARGS; -static GVar G_NEXT__CONSTRUCTOR__0ARGS; -static GVar G_NEXT__CONSTRUCTOR__1ARGS; -static GVar G_NEXT__CONSTRUCTOR__2ARGS; -static GVar G_NEXT__CONSTRUCTOR__3ARGS; -static GVar G_NEXT__CONSTRUCTOR__4ARGS; -static GVar G_NEXT__CONSTRUCTOR__5ARGS; -static GVar G_NEXT__CONSTRUCTOR__6ARGS; -static GVar G_Error; -static Obj GF_Error; -static GVar G_IS__IDENTICAL__OBJ; -static Obj GF_IS__IDENTICAL__OBJ; -static GVar G_TRY__NEXT__METHOD; -static Obj GC_TRY__NEXT__METHOD; -static GVar G_IS__SUBSET__FLAGS; -static Obj GF_IS__SUBSET__FLAGS; -static GVar G_METHODS__OPERATION; -static Obj GF_METHODS__OPERATION; -static GVar G_fail; -static Obj GC_fail; -static GVar G_LEN__LIST; -static Obj GF_LEN__LIST; -static GVar G_METHOD__XARGS; -static GVar G_NEXT__METHOD__XARGS; -static GVar G_AttributeValueNotSet; -static GVar G_TypeObj; -static Obj GF_TypeObj; -static GVar G_FamilyObj; -static Obj GF_FamilyObj; -static GVar G_CONSTRUCTOR__XARGS; -static GVar G_NEXT__CONSTRUCTOR__XARGS; - -/* record names used in handlers */ - -/* information for the functions */ -static Obj NameFunc[35]; -static Obj FileName; - -/* handler for function 2 */ -static Obj HdlrFunc2 ( - Obj self, - Obj a_operation ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 0 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(0) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1, 5 .. LEN_LIST( methods ) - 3 ] do */ - t_7 = GF_LEN__LIST; - t_6 = CALL_1ARGS( t_7, l_methods ); - CHECK_FUNC_RESULT( t_6 ) - C_DIFF_FIA( t_5, t_6, INTOBJ_INT(3) ) - t_4 = Range3Check( INTOBJ_INT(1), INTOBJ_INT(5), t_5 ); - if ( IS_SMALL_LIST(t_4) ) { - t_3 = (Obj)(UInt)1; - t_1 = INTOBJ_INT(1); - } - else { - t_3 = (Obj)(UInt)0; - t_1 = CALL_1ARGS( GF_ITERATOR, t_4 ); - } - while ( 1 ) { - if ( t_3 ) { - if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break; - t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) ); - t_1 = (Obj)(((UInt)t_1)+4); - if ( t_2 == 0 ) continue; - } - else { - if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break; - t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 ); - } - l_i = t_2; - - /* if methods[i]( ) then */ - CHECK_INT_POS( l_i ) - C_ELM_LIST_FPL( t_7, l_methods, l_i ) - CHECK_FUNC( t_7 ) - t_6 = CALL_0ARGS( t_7 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - if ( t_5 ) { - - /* return methods[i + 1]; */ - C_SUM_FIA( t_6, l_i, INTOBJ_INT(1) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_5; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 3 */ -static Obj HdlrFunc3 ( - Obj self, - Obj a_operation, - Obj a_type1 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 1 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(1) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1, 6 .. LEN_LIST( methods ) - 4 ] do */ - t_7 = GF_LEN__LIST; - t_6 = CALL_1ARGS( t_7, l_methods ); - CHECK_FUNC_RESULT( t_6 ) - C_DIFF_FIA( t_5, t_6, INTOBJ_INT(4) ) - t_4 = Range3Check( INTOBJ_INT(1), INTOBJ_INT(6), t_5 ); - if ( IS_SMALL_LIST(t_4) ) { - t_3 = (Obj)(UInt)1; - t_1 = INTOBJ_INT(1); - } - else { - t_3 = (Obj)(UInt)0; - t_1 = CALL_1ARGS( GF_ITERATOR, t_4 ); - } - while ( 1 ) { - if ( t_3 ) { - if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break; - t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) ); - t_1 = (Obj)(((UInt)t_1)+4); - if ( t_2 == 0 ) continue; - } - else { - if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break; - t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 ); - } - l_i = t_2; - - /* if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and methods[i]( type1![1] ) then */ - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type1, 2 ); - C_SUM_FIA( t_11, l_i, INTOBJ_INT(1) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_5 = t_6; - if ( t_5 ) { - CHECK_INT_POS( l_i ) - C_ELM_LIST_FPL( t_9, l_methods, l_i ) - CHECK_FUNC( t_9 ) - C_ELM_POSOBJ_NLE( t_10, a_type1, 1 ); - t_8 = CALL_1ARGS( t_9, t_10 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - if ( t_5 ) { - - /* return methods[i + 2]; */ - C_SUM_FIA( t_6, l_i, INTOBJ_INT(2) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_5; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 4 */ -static Obj HdlrFunc4 ( - Obj self, - Obj a_operation, - Obj a_type1, - Obj a_type2 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 2 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(2) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1, 7 .. LEN_LIST( methods ) - 5 ] do */ - t_7 = GF_LEN__LIST; - t_6 = CALL_1ARGS( t_7, l_methods ); - CHECK_FUNC_RESULT( t_6 ) - C_DIFF_FIA( t_5, t_6, INTOBJ_INT(5) ) - t_4 = Range3Check( INTOBJ_INT(1), INTOBJ_INT(7), t_5 ); - if ( IS_SMALL_LIST(t_4) ) { - t_3 = (Obj)(UInt)1; - t_1 = INTOBJ_INT(1); - } - else { - t_3 = (Obj)(UInt)0; - t_1 = CALL_1ARGS( GF_ITERATOR, t_4 ); - } - while ( 1 ) { - if ( t_3 ) { - if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break; - t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) ); - t_1 = (Obj)(((UInt)t_1)+4); - if ( t_2 == 0 ) continue; - } - else { - if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break; - t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 ); - } - l_i = t_2; - - /* if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and IS_SUBSET_FLAGS( type2![2], methods[i + 2] ) and methods[i]( type1![1], type2![1] ) then */ - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type1, 2 ); - C_SUM_FIA( t_12, l_i, INTOBJ_INT(1) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type2, 2 ); - C_SUM_FIA( t_13, l_i, INTOBJ_INT(2) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - CHECK_INT_POS( l_i ) - C_ELM_LIST_FPL( t_9, l_methods, l_i ) - CHECK_FUNC( t_9 ) - C_ELM_POSOBJ_NLE( t_10, a_type1, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type2, 1 ); - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - if ( t_5 ) { - - /* return methods[i + 3]; */ - C_SUM_FIA( t_6, l_i, INTOBJ_INT(3) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_5; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 5 */ -static Obj HdlrFunc5 ( - Obj self, - Obj a_operation, - Obj a_type1, - Obj a_type2, - Obj a_type3 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 3 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(3) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1, 8 .. LEN_LIST( methods ) - 6 ] do */ - t_7 = GF_LEN__LIST; - t_6 = CALL_1ARGS( t_7, l_methods ); - CHECK_FUNC_RESULT( t_6 ) - C_DIFF_FIA( t_5, t_6, INTOBJ_INT(6) ) - t_4 = Range3Check( INTOBJ_INT(1), INTOBJ_INT(8), t_5 ); - if ( IS_SMALL_LIST(t_4) ) { - t_3 = (Obj)(UInt)1; - t_1 = INTOBJ_INT(1); - } - else { - t_3 = (Obj)(UInt)0; - t_1 = CALL_1ARGS( GF_ITERATOR, t_4 ); - } - while ( 1 ) { - if ( t_3 ) { - if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break; - t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) ); - t_1 = (Obj)(((UInt)t_1)+4); - if ( t_2 == 0 ) continue; - } - else { - if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break; - t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 ); - } - l_i = t_2; - - /* if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and IS_SUBSET_FLAGS( type2![2], methods[i + 2] ) and IS_SUBSET_FLAGS( type3![2], methods[i + 3] ) and methods[i]( type1![1], type2![1], type3![1] ) then */ - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type1, 2 ); - C_SUM_FIA( t_13, l_i, INTOBJ_INT(1) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_7 = t_8; - if ( t_7 ) { - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type2, 2 ); - C_SUM_FIA( t_14, l_i, INTOBJ_INT(2) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_7 = t_9; - } - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type3, 2 ); - C_SUM_FIA( t_13, l_i, INTOBJ_INT(3) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - CHECK_INT_POS( l_i ) - C_ELM_LIST_FPL( t_9, l_methods, l_i ) - CHECK_FUNC( t_9 ) - C_ELM_POSOBJ_NLE( t_10, a_type1, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_12, a_type3, 1 ); - t_8 = CALL_3ARGS( t_9, t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - if ( t_5 ) { - - /* return methods[i + 4]; */ - C_SUM_FIA( t_6, l_i, INTOBJ_INT(4) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_5; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 6 */ -static Obj HdlrFunc6 ( - Obj self, - Obj a_operation, - Obj a_type1, - Obj a_type2, - Obj a_type3, - Obj a_type4 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 4 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(4) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1, 9 .. LEN_LIST( methods ) - 7 ] do */ - t_7 = GF_LEN__LIST; - t_6 = CALL_1ARGS( t_7, l_methods ); - CHECK_FUNC_RESULT( t_6 ) - C_DIFF_FIA( t_5, t_6, INTOBJ_INT(7) ) - t_4 = Range3Check( INTOBJ_INT(1), INTOBJ_INT(9), t_5 ); - if ( IS_SMALL_LIST(t_4) ) { - t_3 = (Obj)(UInt)1; - t_1 = INTOBJ_INT(1); - } - else { - t_3 = (Obj)(UInt)0; - t_1 = CALL_1ARGS( GF_ITERATOR, t_4 ); - } - while ( 1 ) { - if ( t_3 ) { - if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break; - t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) ); - t_1 = (Obj)(((UInt)t_1)+4); - if ( t_2 == 0 ) continue; - } - else { - if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break; - t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 ); - } - l_i = t_2; - - /* if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and IS_SUBSET_FLAGS( type2![2], methods[i + 2] ) and IS_SUBSET_FLAGS( type3![2], methods[i + 3] ) and IS_SUBSET_FLAGS( type4![2], methods[i + 4] ) and methods[i]( type1![1], type2![1], type3![1], - type4![1] ) then */ - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type1, 2 ); - C_SUM_FIA( t_14, l_i, INTOBJ_INT(1) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_8 = t_9; - if ( t_8 ) { - t_12 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_13, a_type2, 2 ); - C_SUM_FIA( t_15, l_i, INTOBJ_INT(2) ) - CHECK_INT_POS( t_15 ) - C_ELM_LIST_FPL( t_14, l_methods, t_15 ) - t_11 = CALL_2ARGS( t_12, t_13, t_14 ); - CHECK_FUNC_RESULT( t_11 ) - CHECK_BOOL( t_11 ) - t_10 = (Obj)(UInt)(t_11 != False); - t_8 = t_10; - } - t_7 = t_8; - if ( t_7 ) { - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type3, 2 ); - C_SUM_FIA( t_14, l_i, INTOBJ_INT(3) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_7 = t_9; - } - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type4, 2 ); - C_SUM_FIA( t_13, l_i, INTOBJ_INT(4) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - CHECK_INT_POS( l_i ) - C_ELM_LIST_FPL( t_9, l_methods, l_i ) - CHECK_FUNC( t_9 ) - C_ELM_POSOBJ_NLE( t_10, a_type1, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_12, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_13, a_type4, 1 ); - t_8 = CALL_4ARGS( t_9, t_10, t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - if ( t_5 ) { - - /* return methods[i + 5]; */ - C_SUM_FIA( t_6, l_i, INTOBJ_INT(5) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_5; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 7 */ -static Obj HdlrFunc7 ( - Obj self, - Obj a_operation, - Obj a_type1, - Obj a_type2, - Obj a_type3, - Obj a_type4, - Obj a_type5 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - Obj t_16 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 5 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(5) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1, 10 .. LEN_LIST( methods ) - 8 ] do */ - t_7 = GF_LEN__LIST; - t_6 = CALL_1ARGS( t_7, l_methods ); - CHECK_FUNC_RESULT( t_6 ) - C_DIFF_FIA( t_5, t_6, INTOBJ_INT(8) ) - t_4 = Range3Check( INTOBJ_INT(1), INTOBJ_INT(10), t_5 ); - if ( IS_SMALL_LIST(t_4) ) { - t_3 = (Obj)(UInt)1; - t_1 = INTOBJ_INT(1); - } - else { - t_3 = (Obj)(UInt)0; - t_1 = CALL_1ARGS( GF_ITERATOR, t_4 ); - } - while ( 1 ) { - if ( t_3 ) { - if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break; - t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) ); - t_1 = (Obj)(((UInt)t_1)+4); - if ( t_2 == 0 ) continue; - } - else { - if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break; - t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 ); - } - l_i = t_2; - - /* if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and IS_SUBSET_FLAGS( type2![2], methods[i + 2] ) and IS_SUBSET_FLAGS( type3![2], methods[i + 3] ) and IS_SUBSET_FLAGS( type4![2], methods[i + 4] ) and IS_SUBSET_FLAGS( type5![2], methods[i + 5] ) -and methods[i]( type1![1], type2![1], type3![1], type4![1], type5![1] ) then */ - t_12 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_13, a_type1, 2 ); - C_SUM_FIA( t_15, l_i, INTOBJ_INT(1) ) - CHECK_INT_POS( t_15 ) - C_ELM_LIST_FPL( t_14, l_methods, t_15 ) - t_11 = CALL_2ARGS( t_12, t_13, t_14 ); - CHECK_FUNC_RESULT( t_11 ) - CHECK_BOOL( t_11 ) - t_10 = (Obj)(UInt)(t_11 != False); - t_9 = t_10; - if ( t_9 ) { - t_13 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_14, a_type2, 2 ); - C_SUM_FIA( t_16, l_i, INTOBJ_INT(2) ) - CHECK_INT_POS( t_16 ) - C_ELM_LIST_FPL( t_15, l_methods, t_16 ) - t_12 = CALL_2ARGS( t_13, t_14, t_15 ); - CHECK_FUNC_RESULT( t_12 ) - CHECK_BOOL( t_12 ) - t_11 = (Obj)(UInt)(t_12 != False); - t_9 = t_11; - } - t_8 = t_9; - if ( t_8 ) { - t_12 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_13, a_type3, 2 ); - C_SUM_FIA( t_15, l_i, INTOBJ_INT(3) ) - CHECK_INT_POS( t_15 ) - C_ELM_LIST_FPL( t_14, l_methods, t_15 ) - t_11 = CALL_2ARGS( t_12, t_13, t_14 ); - CHECK_FUNC_RESULT( t_11 ) - CHECK_BOOL( t_11 ) - t_10 = (Obj)(UInt)(t_11 != False); - t_8 = t_10; - } - t_7 = t_8; - if ( t_7 ) { - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type4, 2 ); - C_SUM_FIA( t_14, l_i, INTOBJ_INT(4) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_7 = t_9; - } - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type5, 2 ); - C_SUM_FIA( t_13, l_i, INTOBJ_INT(5) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - CHECK_INT_POS( l_i ) - C_ELM_LIST_FPL( t_9, l_methods, l_i ) - CHECK_FUNC( t_9 ) - C_ELM_POSOBJ_NLE( t_10, a_type1, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_12, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_13, a_type4, 1 ); - C_ELM_POSOBJ_NLE( t_14, a_type5, 1 ); - t_8 = CALL_5ARGS( t_9, t_10, t_11, t_12, t_13, t_14 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - if ( t_5 ) { - - /* return methods[i + 6]; */ - C_SUM_FIA( t_6, l_i, INTOBJ_INT(6) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_5; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 8 */ -static Obj HdlrFunc8 ( - Obj self, - Obj args ) -{ - Obj a_operation; - Obj a_type1; - Obj a_type2; - Obj a_type3; - Obj a_type4; - Obj a_type5; - Obj a_type6; - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - Obj t_16 = 0; - Obj t_17 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - CHECK_NR_ARGS( 7, args ) - a_operation = ELM_PLIST( args, 1 ); - a_type1 = ELM_PLIST( args, 2 ); - a_type2 = ELM_PLIST( args, 3 ); - a_type3 = ELM_PLIST( args, 4 ); - a_type4 = ELM_PLIST( args, 5 ); - a_type5 = ELM_PLIST( args, 6 ); - a_type6 = ELM_PLIST( args, 7 ); - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 6 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(6) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1, 11 .. LEN_LIST( methods ) - 9 ] do */ - t_7 = GF_LEN__LIST; - t_6 = CALL_1ARGS( t_7, l_methods ); - CHECK_FUNC_RESULT( t_6 ) - C_DIFF_FIA( t_5, t_6, INTOBJ_INT(9) ) - t_4 = Range3Check( INTOBJ_INT(1), INTOBJ_INT(11), t_5 ); - if ( IS_SMALL_LIST(t_4) ) { - t_3 = (Obj)(UInt)1; - t_1 = INTOBJ_INT(1); - } - else { - t_3 = (Obj)(UInt)0; - t_1 = CALL_1ARGS( GF_ITERATOR, t_4 ); - } - while ( 1 ) { - if ( t_3 ) { - if ( LEN_LIST(t_4) < INT_INTOBJ(t_1) ) break; - t_2 = ELMV0_LIST( t_4, INT_INTOBJ(t_1) ); - t_1 = (Obj)(((UInt)t_1)+4); - if ( t_2 == 0 ) continue; - } - else { - if ( CALL_1ARGS( GF_IS_DONE_ITER, t_1 ) != False ) break; - t_2 = CALL_1ARGS( GF_NEXT_ITER, t_1 ); - } - l_i = t_2; - - /* if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and IS_SUBSET_FLAGS( type2![2], methods[i + 2] ) and IS_SUBSET_FLAGS( type3![2], methods[i + 3] ) and IS_SUBSET_FLAGS( type4![2], methods[i + 4] ) and IS_SUBSET_FLAGS( type5![2], methods[i + 5] ) - and IS_SUBSET_FLAGS( type6![2], methods[i + 6] ) and methods[i]( type1![1], type2![1], type3![1], type4![1], type5![1], type6![1] ) then */ - t_13 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_14, a_type1, 2 ); - C_SUM_FIA( t_16, l_i, INTOBJ_INT(1) ) - CHECK_INT_POS( t_16 ) - C_ELM_LIST_FPL( t_15, l_methods, t_16 ) - t_12 = CALL_2ARGS( t_13, t_14, t_15 ); - CHECK_FUNC_RESULT( t_12 ) - CHECK_BOOL( t_12 ) - t_11 = (Obj)(UInt)(t_12 != False); - t_10 = t_11; - if ( t_10 ) { - t_14 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_15, a_type2, 2 ); - C_SUM_FIA( t_17, l_i, INTOBJ_INT(2) ) - CHECK_INT_POS( t_17 ) - C_ELM_LIST_FPL( t_16, l_methods, t_17 ) - t_13 = CALL_2ARGS( t_14, t_15, t_16 ); - CHECK_FUNC_RESULT( t_13 ) - CHECK_BOOL( t_13 ) - t_12 = (Obj)(UInt)(t_13 != False); - t_10 = t_12; - } - t_9 = t_10; - if ( t_9 ) { - t_13 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_14, a_type3, 2 ); - C_SUM_FIA( t_16, l_i, INTOBJ_INT(3) ) - CHECK_INT_POS( t_16 ) - C_ELM_LIST_FPL( t_15, l_methods, t_16 ) - t_12 = CALL_2ARGS( t_13, t_14, t_15 ); - CHECK_FUNC_RESULT( t_12 ) - CHECK_BOOL( t_12 ) - t_11 = (Obj)(UInt)(t_12 != False); - t_9 = t_11; - } - t_8 = t_9; - if ( t_8 ) { - t_12 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_13, a_type4, 2 ); - C_SUM_FIA( t_15, l_i, INTOBJ_INT(4) ) - CHECK_INT_POS( t_15 ) - C_ELM_LIST_FPL( t_14, l_methods, t_15 ) - t_11 = CALL_2ARGS( t_12, t_13, t_14 ); - CHECK_FUNC_RESULT( t_11 ) - CHECK_BOOL( t_11 ) - t_10 = (Obj)(UInt)(t_11 != False); - t_8 = t_10; - } - t_7 = t_8; - if ( t_7 ) { - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type5, 2 ); - C_SUM_FIA( t_14, l_i, INTOBJ_INT(5) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_7 = t_9; - } - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type6, 2 ); - C_SUM_FIA( t_13, l_i, INTOBJ_INT(6) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - CHECK_INT_POS( l_i ) - C_ELM_LIST_FPL( t_9, l_methods, l_i ) - CHECK_FUNC( t_9 ) - C_ELM_POSOBJ_NLE( t_10, a_type1, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_12, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_13, a_type4, 1 ); - C_ELM_POSOBJ_NLE( t_14, a_type5, 1 ); - C_ELM_POSOBJ_NLE( t_15, a_type6, 1 ); - t_8 = CALL_6ARGS( t_9, t_10, t_11, t_12, t_13, t_14, t_15 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - if ( t_5 ) { - - /* return methods[i + 7]; */ - C_SUM_FIA( t_6, l_i, INTOBJ_INT(7) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_5; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 9 */ -static Obj HdlrFunc9 ( - Obj self, - Obj a_arg ) -{ - Obj t_1 = 0; - Obj t_2 = 0; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* Error( "not supported yet" ); */ - t_1 = GF_Error; - t_2 = MakeString( "not supported yet" ); - CALL_1ARGS( t_1, t_2 ); - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 10 */ -static Obj HdlrFunc10 ( - Obj self, - Obj a_operation, - Obj a_k ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 0 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(0) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 4 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(4) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if methods[4 * (i - 1) + 1]( ) then */ - C_DIFF_INTOBJS( t_8, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_7, INTOBJ_INT(4), t_8 ) - C_SUM_FIA( t_6, t_7, INTOBJ_INT(1) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - CHECK_FUNC( t_5 ) - t_4 = CALL_0ARGS( t_5 ); - CHECK_FUNC_RESULT( t_4 ) - CHECK_BOOL( t_4 ) - t_3 = (Obj)(UInt)(t_4 != False); - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[4 * (i - 1) + 2]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(4), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(2) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 11 */ -static Obj HdlrFunc11 ( - Obj self, - Obj a_operation, - Obj a_k, - Obj a_type1 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 1 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(1) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 5 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(5) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( type1![2], methods[5 * (i - 1) + 2] ) and methods[5 * (i - 1) + 1]( type1![1] ) then */ - t_6 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_7, a_type1, 2 ); - C_DIFF_INTOBJS( t_11, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_10, INTOBJ_INT(5), t_11 ) - C_SUM_FIA( t_9, t_10, INTOBJ_INT(2) ) - CHECK_INT_POS( t_9 ) - C_ELM_LIST_FPL( t_8, l_methods, t_9 ) - t_5 = CALL_2ARGS( t_6, t_7, t_8 ); - CHECK_FUNC_RESULT( t_5 ) - CHECK_BOOL( t_5 ) - t_4 = (Obj)(UInt)(t_5 != False); - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(5), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type1, 1 ); - t_6 = CALL_1ARGS( t_7, t_8 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[5 * (i - 1) + 3]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(5), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(3) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 12 */ -static Obj HdlrFunc12 ( - Obj self, - Obj a_operation, - Obj a_k, - Obj a_type1, - Obj a_type2 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 2 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(2) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 6 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(6) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( type1![2], methods[6 * (i - 1) + 2] ) and IS_SUBSET_FLAGS( type2![2], methods[6 * (i - 1) + 3] ) and methods[6 * (i - 1) + 1]( type1![1], type2![1] ) then */ - t_7 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_8, a_type1, 2 ); - C_DIFF_INTOBJS( t_12, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_11, INTOBJ_INT(6), t_12 ) - C_SUM_FIA( t_10, t_11, INTOBJ_INT(2) ) - CHECK_INT_POS( t_10 ) - C_ELM_LIST_FPL( t_9, l_methods, t_10 ) - t_6 = CALL_2ARGS( t_7, t_8, t_9 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type2, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(6), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(3) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(6), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type1, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type2, 1 ); - t_6 = CALL_2ARGS( t_7, t_8, t_9 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[6 * (i - 1) + 4]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(6), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(4) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 13 */ -static Obj HdlrFunc13 ( - Obj self, - Obj a_operation, - Obj a_k, - Obj a_type1, - Obj a_type2, - Obj a_type3 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 3 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(3) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 7 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(7) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( type1![2], methods[7 * (i - 1) + 2] ) and IS_SUBSET_FLAGS( type2![2], methods[7 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[7 * (i - 1) + 4] ) and methods[7 * (i - 1) + 1]( type1![1], type2![1], type3![1] ) then */ - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type1, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(7), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(2) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type2, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(7), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(3) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type3, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(7), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(4) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(7), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type1, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_10, a_type3, 1 ); - t_6 = CALL_3ARGS( t_7, t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[7 * (i - 1) + 5]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(7), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(5) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 14 */ -static Obj HdlrFunc14 ( - Obj self, - Obj a_operation, - Obj a_k, - Obj a_type1, - Obj a_type2, - Obj a_type3, - Obj a_type4 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 4 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(4) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 8 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(8) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( type1![2], methods[8 * (i - 1) + 2] ) and IS_SUBSET_FLAGS( type2![2], methods[8 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[8 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[8 * (i - 1) + 5] ) -and methods[8 * (i - 1) + 1]( type1![1], type2![1], type3![1], type4![1] ) then */ - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type1, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(8), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(2) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type2, 2 ); - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(8), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(3) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type3, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(8), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(4) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type4, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(8), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(5) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(8), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type1, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_10, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type4, 1 ); - t_6 = CALL_4ARGS( t_7, t_8, t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[8 * (i - 1) + 6]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(8), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(6) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 15 */ -static Obj HdlrFunc15 ( - Obj self, - Obj args ) -{ - Obj a_operation; - Obj a_k; - Obj a_type1; - Obj a_type2; - Obj a_type3; - Obj a_type4; - Obj a_type5; - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - Obj t_16 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - CHECK_NR_ARGS( 7, args ) - a_operation = ELM_PLIST( args, 1 ); - a_k = ELM_PLIST( args, 2 ); - a_type1 = ELM_PLIST( args, 3 ); - a_type2 = ELM_PLIST( args, 4 ); - a_type3 = ELM_PLIST( args, 5 ); - a_type4 = ELM_PLIST( args, 6 ); - a_type5 = ELM_PLIST( args, 7 ); - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 5 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(5) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 9 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(9) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( type1![2], methods[9 * (i - 1) + 2] ) and IS_SUBSET_FLAGS( type2![2], methods[9 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[9 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[9 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9 * (i - 1) + 6] ) and methods[9 * (i - 1) + 1]( type1![1], type2![1], type3![1], type4![1], type5![1] ) then */ - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type1, 2 ); - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(9), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(2) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_7 = t_8; - if ( t_7 ) { - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type2, 2 ); - C_DIFF_INTOBJS( t_16, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_15, INTOBJ_INT(9), t_16 ) - C_SUM_FIA( t_14, t_15, INTOBJ_INT(3) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_7 = t_9; - } - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type3, 2 ); - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(9), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(4) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type4, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(9), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(5) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type5, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(9), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(6) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(9), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type1, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_10, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type4, 1 ); - C_ELM_POSOBJ_NLE( t_12, a_type5, 1 ); - t_6 = CALL_5ARGS( t_7, t_8, t_9, t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[9 * (i - 1) + 7]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(9), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(7) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 16 */ -static Obj HdlrFunc16 ( - Obj self, - Obj args ) -{ - Obj a_operation; - Obj a_k; - Obj a_type1; - Obj a_type2; - Obj a_type3; - Obj a_type4; - Obj a_type5; - Obj a_type6; - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - Obj t_16 = 0; - Obj t_17 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - CHECK_NR_ARGS( 8, args ) - a_operation = ELM_PLIST( args, 1 ); - a_k = ELM_PLIST( args, 2 ); - a_type1 = ELM_PLIST( args, 3 ); - a_type2 = ELM_PLIST( args, 4 ); - a_type3 = ELM_PLIST( args, 5 ); - a_type4 = ELM_PLIST( args, 6 ); - a_type5 = ELM_PLIST( args, 7 ); - a_type6 = ELM_PLIST( args, 8 ); - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 6 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(6) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 10 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(10) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( type1![2], methods[10 * (i - 1) + 2] ) and IS_SUBSET_FLAGS( type2![2], methods[10 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[10 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[10 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10 * (i - 1) + 6] ) and IS_SUBSET_FLAGS( type6![2], methods[10 * (i - 1) + 7] ) and methods[10 * (i - 1) + 1]( type1![1], type2![1], type3![1], type4![1], type5![1], type6![1] ) then */ - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type1, 2 ); - C_DIFF_INTOBJS( t_16, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_15, INTOBJ_INT(10), t_16 ) - C_SUM_FIA( t_14, t_15, INTOBJ_INT(2) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_8 = t_9; - if ( t_8 ) { - t_12 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_13, a_type2, 2 ); - C_DIFF_INTOBJS( t_17, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_16, INTOBJ_INT(10), t_17 ) - C_SUM_FIA( t_15, t_16, INTOBJ_INT(3) ) - CHECK_INT_POS( t_15 ) - C_ELM_LIST_FPL( t_14, l_methods, t_15 ) - t_11 = CALL_2ARGS( t_12, t_13, t_14 ); - CHECK_FUNC_RESULT( t_11 ) - CHECK_BOOL( t_11 ) - t_10 = (Obj)(UInt)(t_11 != False); - t_8 = t_10; - } - t_7 = t_8; - if ( t_7 ) { - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type3, 2 ); - C_DIFF_INTOBJS( t_16, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_15, INTOBJ_INT(10), t_16 ) - C_SUM_FIA( t_14, t_15, INTOBJ_INT(4) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_7 = t_9; - } - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type4, 2 ); - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(10), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(5) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type5, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(10), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(6) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type6, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(10), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(7) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(10), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type1, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_10, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type4, 1 ); - C_ELM_POSOBJ_NLE( t_12, a_type5, 1 ); - C_ELM_POSOBJ_NLE( t_13, a_type6, 1 ); - t_6 = CALL_6ARGS( t_7, t_8, t_9, t_10, t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[10 * (i - 1) + 8]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(10), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(8) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 17 */ -static Obj HdlrFunc17 ( - Obj self, - Obj a_arg ) -{ - Obj t_1 = 0; - Obj t_2 = 0; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* Error( "not supported yet" ); */ - t_1 = GF_Error; - t_2 = MakeString( "not supported yet" ); - CALL_1ARGS( t_1, t_2 ); - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 18 */ -static Obj HdlrFunc18 ( - Obj self, - Obj a_attr, - Obj a_obj ) -{ - Obj l_type = 0; - Obj l_fam = 0; - Obj l_methods = 0; - Obj l_i = 0; - Obj l_flag = 0; - Obj l_erg = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - (void)l_type; - (void)l_fam; - (void)l_methods; - (void)l_i; - (void)l_flag; - (void)l_erg; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* type := TypeObj( obj ); */ - t_2 = GF_TypeObj; - t_1 = CALL_1ARGS( t_2, a_obj ); - CHECK_FUNC_RESULT( t_1 ) - l_type = t_1; - - /* fam := FamilyObj( obj ); */ - t_2 = GF_FamilyObj; - t_1 = CALL_1ARGS( t_2, a_obj ); - CHECK_FUNC_RESULT( t_1 ) - l_fam = t_1; - - /* methods := METHODS_OPERATION( attr, 1 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_attr, INTOBJ_INT(1) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1 .. LEN_LIST( methods ) / 5 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(5) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* flag := true; */ - t_3 = True; - l_flag = t_3; - - /* flag := flag and IS_SUBSET_FLAGS( type![2], methods[5 * (i - 1) + 2] ); */ - if ( l_flag == False ) { - t_3 = l_flag; - } - else if ( l_flag == True ) { - t_5 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_6, l_type, 2 ); - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(5), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(2) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - t_4 = CALL_2ARGS( t_5, t_6, t_7 ); - CHECK_FUNC_RESULT( t_4 ) - CHECK_BOOL( t_4 ) - t_3 = t_4; - } - else { - CHECK_FUNC( l_flag ) - t_6 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_7, l_type, 2 ); - C_DIFF_INTOBJS( t_11, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_10, INTOBJ_INT(5), t_11 ) - C_SUM_FIA( t_9, t_10, INTOBJ_INT(2) ) - CHECK_INT_POS( t_9 ) - C_ELM_LIST_FPL( t_8, l_methods, t_9 ) - t_5 = CALL_2ARGS( t_6, t_7, t_8 ); - CHECK_FUNC_RESULT( t_5 ) - CHECK_FUNC( t_5 ) - t_3 = NewAndFilter( l_flag, t_5 ); - } - l_flag = t_3; - - /* if flag then */ - CHECK_BOOL( l_flag ) - t_3 = (Obj)(UInt)(l_flag != False); - if ( t_3 ) { - - /* flag := flag and methods[5 * (i - 1) + 1]( fam ); */ - if ( l_flag == False ) { - t_3 = l_flag; - } - else if ( l_flag == True ) { - C_DIFF_INTOBJS( t_8, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_7, INTOBJ_INT(5), t_8 ) - C_SUM_FIA( t_6, t_7, INTOBJ_INT(1) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - CHECK_FUNC( t_5 ) - t_4 = CALL_1ARGS( t_5, l_fam ); - CHECK_FUNC_RESULT( t_4 ) - CHECK_BOOL( t_4 ) - t_3 = t_4; - } - else { - CHECK_FUNC( l_flag ) - C_DIFF_INTOBJS( t_9, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_8, INTOBJ_INT(5), t_9 ) - C_SUM_FIA( t_7, t_8, INTOBJ_INT(1) ) - CHECK_INT_POS( t_7 ) - C_ELM_LIST_FPL( t_6, l_methods, t_7 ) - CHECK_FUNC( t_6 ) - t_5 = CALL_1ARGS( t_6, l_fam ); - CHECK_FUNC_RESULT( t_5 ) - CHECK_FUNC( t_5 ) - t_3 = NewAndFilter( l_flag, t_5 ); - } - l_flag = t_3; - - } - /* fi */ - - /* if flag then */ - CHECK_BOOL( l_flag ) - t_3 = (Obj)(UInt)(l_flag != False); - if ( t_3 ) { - - /* attr := methods[5 * (i - 1) + 3]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(5), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(3) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - a_attr = t_3; - - /* erg := attr( obj ); */ - CHECK_FUNC( a_attr ) - t_3 = CALL_1ARGS( a_attr, a_obj ); - CHECK_FUNC_RESULT( t_3 ) - l_erg = t_3; - - /* if not IS_IDENTICAL_OBJ( erg, TRY_NEXT_METHOD ) then */ - t_6 = GF_IS__IDENTICAL__OBJ; - t_7 = GC_TRY__NEXT__METHOD; - CHECK_BOUND( t_7, "TRY_NEXT_METHOD" ) - t_5 = CALL_2ARGS( t_6, l_erg, t_7 ); - CHECK_FUNC_RESULT( t_5 ) - CHECK_BOOL( t_5 ) - t_4 = (Obj)(UInt)(t_5 != False); - t_3 = (Obj)(UInt)( ! ((Int)t_4) ); - if ( t_3 ) { - - /* return erg; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return l_erg; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* Error( "No applicable method found for attribute" ); */ - t_1 = GF_Error; - t_2 = MakeString( "No applicable method found for attribute" ); - CALL_1ARGS( t_1, t_2 ); - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 19 */ -static Obj HdlrFunc19 ( - Obj self, - Obj a_operation ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 0 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(0) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1 .. LEN_LIST( methods ) / 4 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(4) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if methods[4 * (i - 1) + 1]( ) then */ - C_DIFF_INTOBJS( t_8, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_7, INTOBJ_INT(4), t_8 ) - C_SUM_FIA( t_6, t_7, INTOBJ_INT(1) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - CHECK_FUNC( t_5 ) - t_4 = CALL_0ARGS( t_5 ); - CHECK_FUNC_RESULT( t_4 ) - CHECK_BOOL( t_4 ) - t_3 = (Obj)(UInt)(t_4 != False); - if ( t_3 ) { - - /* return methods[4 * (i - 1) + 2]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(4), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(2) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 20 */ -static Obj HdlrFunc20 ( - Obj self, - Obj a_operation, - Obj a_flags1 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 1 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(1) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1 .. LEN_LIST( methods ) / 5 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(5) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[5 * (i - 1) + 2], flags1 ) and methods[5 * (i - 1) + 1]( flags1 ) then */ - t_6 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(5), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(2) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - t_5 = CALL_2ARGS( t_6, t_7, a_flags1 ); - CHECK_FUNC_RESULT( t_5 ) - CHECK_BOOL( t_5 ) - t_4 = (Obj)(UInt)(t_5 != False); - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(5), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - t_6 = CALL_1ARGS( t_7, a_flags1 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* return methods[5 * (i - 1) + 3]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(5), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(3) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 21 */ -static Obj HdlrFunc21 ( - Obj self, - Obj a_operation, - Obj a_flags1, - Obj a_type2 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 2 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(2) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1 .. LEN_LIST( methods ) / 6 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(6) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[6 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[6 * (i - 1) + 3] ) and methods[6 * (i - 1) + 1]( flags1, type2![1] ) then */ - t_7 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_11, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_10, INTOBJ_INT(6), t_11 ) - C_SUM_FIA( t_9, t_10, INTOBJ_INT(2) ) - CHECK_INT_POS( t_9 ) - C_ELM_LIST_FPL( t_8, l_methods, t_9 ) - t_6 = CALL_2ARGS( t_7, t_8, a_flags1 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type2, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(6), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(3) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(6), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type2, 1 ); - t_6 = CALL_2ARGS( t_7, a_flags1, t_8 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* return methods[6 * (i - 1) + 4]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(6), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(4) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 22 */ -static Obj HdlrFunc22 ( - Obj self, - Obj a_operation, - Obj a_flags1, - Obj a_type2, - Obj a_type3 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 3 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(3) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1 .. LEN_LIST( methods ) / 7 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(7) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[7 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[7 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[7 * (i - 1) + 4] ) and methods[7 * (i - 1) + 1]( flags1, type2![1], type3![1] ) then */ - t_8 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_12, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_11, INTOBJ_INT(7), t_12 ) - C_SUM_FIA( t_10, t_11, INTOBJ_INT(2) ) - CHECK_INT_POS( t_10 ) - C_ELM_LIST_FPL( t_9, l_methods, t_10 ) - t_7 = CALL_2ARGS( t_8, t_9, a_flags1 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type2, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(7), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(3) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type3, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(7), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(4) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(7), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type3, 1 ); - t_6 = CALL_3ARGS( t_7, a_flags1, t_8, t_9 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* return methods[7 * (i - 1) + 5]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(7), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(5) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 23 */ -static Obj HdlrFunc23 ( - Obj self, - Obj a_operation, - Obj a_flags1, - Obj a_type2, - Obj a_type3, - Obj a_type4 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 4 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(4) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1 .. LEN_LIST( methods ) / 8 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(8) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[8 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[8 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[8 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[8 * (i - 1) + 5] ) -and methods[8 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1] ) then */ - t_9 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(8), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(2) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_8 = CALL_2ARGS( t_9, t_10, a_flags1 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type2, 2 ); - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(8), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(3) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type3, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(8), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(4) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type4, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(8), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(5) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(8), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_10, a_type4, 1 ); - t_6 = CALL_4ARGS( t_7, a_flags1, t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* return methods[8 * (i - 1) + 6]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(8), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(6) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 24 */ -static Obj HdlrFunc24 ( - Obj self, - Obj a_operation, - Obj a_flags1, - Obj a_type2, - Obj a_type3, - Obj a_type4, - Obj a_type5 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - Obj t_16 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 5 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(5) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1 .. LEN_LIST( methods ) / 9 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(9) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[9 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[9 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[9 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[9 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9 * (i - 1) + 6] ) and methods[9 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1], type5![1] ) then */ - t_10 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(9), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(2) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_9 = CALL_2ARGS( t_10, t_11, a_flags1 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_7 = t_8; - if ( t_7 ) { - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type2, 2 ); - C_DIFF_INTOBJS( t_16, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_15, INTOBJ_INT(9), t_16 ) - C_SUM_FIA( t_14, t_15, INTOBJ_INT(3) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_7 = t_9; - } - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type3, 2 ); - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(9), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(4) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type4, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(9), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(5) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type5, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(9), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(6) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(9), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_10, a_type4, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type5, 1 ); - t_6 = CALL_5ARGS( t_7, a_flags1, t_8, t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* return methods[9 * (i - 1) + 7]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(9), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(7) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 25 */ -static Obj HdlrFunc25 ( - Obj self, - Obj args ) -{ - Obj a_operation; - Obj a_flags1; - Obj a_type2; - Obj a_type3; - Obj a_type4; - Obj a_type5; - Obj a_type6; - Obj l_methods = 0; - Obj l_i = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - Obj t_16 = 0; - Obj t_17 = 0; - (void)l_methods; - (void)l_i; - Bag oldFrame; - OLD_BRK_CURR_STAT - CHECK_NR_ARGS( 7, args ) - a_operation = ELM_PLIST( args, 1 ); - a_flags1 = ELM_PLIST( args, 2 ); - a_type2 = ELM_PLIST( args, 3 ); - a_type3 = ELM_PLIST( args, 4 ); - a_type4 = ELM_PLIST( args, 5 ); - a_type5 = ELM_PLIST( args, 6 ); - a_type6 = ELM_PLIST( args, 7 ); - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 6 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(6) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* for i in [ 1 .. LEN_LIST( methods ) / 10 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(10) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[10 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[10 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[10 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[10 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10 * (i - 1) + 6] ) and IS_SUBSET_FLAGS( type6![2], methods[10 * (i - 1) + 7] ) and methods[10 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1], type5![1], type6![1] ) then */ - t_11 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(10), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(2) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_10 = CALL_2ARGS( t_11, t_12, a_flags1 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_8 = t_9; - if ( t_8 ) { - t_12 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_13, a_type2, 2 ); - C_DIFF_INTOBJS( t_17, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_16, INTOBJ_INT(10), t_17 ) - C_SUM_FIA( t_15, t_16, INTOBJ_INT(3) ) - CHECK_INT_POS( t_15 ) - C_ELM_LIST_FPL( t_14, l_methods, t_15 ) - t_11 = CALL_2ARGS( t_12, t_13, t_14 ); - CHECK_FUNC_RESULT( t_11 ) - CHECK_BOOL( t_11 ) - t_10 = (Obj)(UInt)(t_11 != False); - t_8 = t_10; - } - t_7 = t_8; - if ( t_7 ) { - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type3, 2 ); - C_DIFF_INTOBJS( t_16, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_15, INTOBJ_INT(10), t_16 ) - C_SUM_FIA( t_14, t_15, INTOBJ_INT(4) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_7 = t_9; - } - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type4, 2 ); - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(10), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(5) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type5, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(10), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(6) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type6, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(10), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(7) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(10), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_10, a_type4, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type5, 1 ); - C_ELM_POSOBJ_NLE( t_12, a_type6, 1 ); - t_6 = CALL_6ARGS( t_7, a_flags1, t_8, t_9, t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* return methods[10 * (i - 1) + 8]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(10), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(8) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 26 */ -static Obj HdlrFunc26 ( - Obj self, - Obj a_arg ) -{ - Obj t_1 = 0; - Obj t_2 = 0; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* Error( "not supported yet" ); */ - t_1 = GF_Error; - t_2 = MakeString( "not supported yet" ); - CALL_1ARGS( t_1, t_2 ); - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 27 */ -static Obj HdlrFunc27 ( - Obj self, - Obj a_operation, - Obj a_k ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 0 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(0) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 4 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(4) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if methods[4 * (i - 1) + 1]( ) then */ - C_DIFF_INTOBJS( t_8, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_7, INTOBJ_INT(4), t_8 ) - C_SUM_FIA( t_6, t_7, INTOBJ_INT(1) ) - CHECK_INT_POS( t_6 ) - C_ELM_LIST_FPL( t_5, l_methods, t_6 ) - CHECK_FUNC( t_5 ) - t_4 = CALL_0ARGS( t_5 ); - CHECK_FUNC_RESULT( t_4 ) - CHECK_BOOL( t_4 ) - t_3 = (Obj)(UInt)(t_4 != False); - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[4 * (i - 1) + 2]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(4), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(2) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 28 */ -static Obj HdlrFunc28 ( - Obj self, - Obj a_operation, - Obj a_k, - Obj a_flags1 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 1 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(1) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 5 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(5) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[5 * (i - 1) + 2], flags1 ) and methods[5 * (i - 1) + 1]( flags1 ) then */ - t_6 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(5), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(2) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - t_5 = CALL_2ARGS( t_6, t_7, a_flags1 ); - CHECK_FUNC_RESULT( t_5 ) - CHECK_BOOL( t_5 ) - t_4 = (Obj)(UInt)(t_5 != False); - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(5), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - t_6 = CALL_1ARGS( t_7, a_flags1 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[5 * (i - 1) + 3]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(5), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(3) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 29 */ -static Obj HdlrFunc29 ( - Obj self, - Obj a_operation, - Obj a_k, - Obj a_flags1, - Obj a_type2 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 2 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(2) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 6 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(6) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[6 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[6 * (i - 1) + 3] ) and methods[6 * (i - 1) + 1]( flags1, type2![1] ) then */ - t_7 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_11, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_10, INTOBJ_INT(6), t_11 ) - C_SUM_FIA( t_9, t_10, INTOBJ_INT(2) ) - CHECK_INT_POS( t_9 ) - C_ELM_LIST_FPL( t_8, l_methods, t_9 ) - t_6 = CALL_2ARGS( t_7, t_8, a_flags1 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type2, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(6), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(3) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(6), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type2, 1 ); - t_6 = CALL_2ARGS( t_7, a_flags1, t_8 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[6 * (i - 1) + 4]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(6), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(4) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 30 */ -static Obj HdlrFunc30 ( - Obj self, - Obj a_operation, - Obj a_k, - Obj a_flags1, - Obj a_type2, - Obj a_type3 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 3 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(3) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 7 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(7) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[7 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[7 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[7 * (i - 1) + 4] ) and methods[7 * (i - 1) + 1]( flags1, type2![1], type3![1] ) then */ - t_8 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_12, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_11, INTOBJ_INT(7), t_12 ) - C_SUM_FIA( t_10, t_11, INTOBJ_INT(2) ) - CHECK_INT_POS( t_10 ) - C_ELM_LIST_FPL( t_9, l_methods, t_10 ) - t_7 = CALL_2ARGS( t_8, t_9, a_flags1 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type2, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(7), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(3) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type3, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(7), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(4) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(7), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type3, 1 ); - t_6 = CALL_3ARGS( t_7, a_flags1, t_8, t_9 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[7 * (i - 1) + 5]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(7), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(5) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 31 */ -static Obj HdlrFunc31 ( - Obj self, - Obj a_operation, - Obj a_k, - Obj a_flags1, - Obj a_type2, - Obj a_type3, - Obj a_type4 ) -{ - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 4 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(4) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 8 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(8) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[8 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[8 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[8 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[8 * (i - 1) + 5] ) -and methods[8 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1] ) then */ - t_9 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(8), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(2) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_8 = CALL_2ARGS( t_9, t_10, a_flags1 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type2, 2 ); - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(8), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(3) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type3, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(8), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(4) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type4, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(8), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(5) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(8), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_10, a_type4, 1 ); - t_6 = CALL_4ARGS( t_7, a_flags1, t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[8 * (i - 1) + 6]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(8), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(6) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 32 */ -static Obj HdlrFunc32 ( - Obj self, - Obj args ) -{ - Obj a_operation; - Obj a_k; - Obj a_flags1; - Obj a_type2; - Obj a_type3; - Obj a_type4; - Obj a_type5; - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - Obj t_16 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - CHECK_NR_ARGS( 7, args ) - a_operation = ELM_PLIST( args, 1 ); - a_k = ELM_PLIST( args, 2 ); - a_flags1 = ELM_PLIST( args, 3 ); - a_type2 = ELM_PLIST( args, 4 ); - a_type3 = ELM_PLIST( args, 5 ); - a_type4 = ELM_PLIST( args, 6 ); - a_type5 = ELM_PLIST( args, 7 ); - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 5 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(5) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 9 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(9) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[9 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[9 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[9 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[9 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9 * (i - 1) + 6] ) and methods[9 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1], type5![1] ) then */ - t_10 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(9), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(2) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_9 = CALL_2ARGS( t_10, t_11, a_flags1 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_7 = t_8; - if ( t_7 ) { - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type2, 2 ); - C_DIFF_INTOBJS( t_16, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_15, INTOBJ_INT(9), t_16 ) - C_SUM_FIA( t_14, t_15, INTOBJ_INT(3) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_7 = t_9; - } - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type3, 2 ); - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(9), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(4) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type4, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(9), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(5) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type5, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(9), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(6) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(9), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_10, a_type4, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type5, 1 ); - t_6 = CALL_5ARGS( t_7, a_flags1, t_8, t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[9 * (i - 1) + 7]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(9), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(7) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 33 */ -static Obj HdlrFunc33 ( - Obj self, - Obj args ) -{ - Obj a_operation; - Obj a_k; - Obj a_flags1; - Obj a_type2; - Obj a_type3; - Obj a_type4; - Obj a_type5; - Obj a_type6; - Obj l_methods = 0; - Obj l_i = 0; - Obj l_j = 0; - Obj t_1 = 0; - Obj t_2 = 0; - Obj t_3 = 0; - Obj t_4 = 0; - Obj t_5 = 0; - Obj t_6 = 0; - Obj t_7 = 0; - Obj t_8 = 0; - Obj t_9 = 0; - Obj t_10 = 0; - Obj t_11 = 0; - Obj t_12 = 0; - Obj t_13 = 0; - Obj t_14 = 0; - Obj t_15 = 0; - Obj t_16 = 0; - Obj t_17 = 0; - (void)l_methods; - (void)l_i; - (void)l_j; - Bag oldFrame; - OLD_BRK_CURR_STAT - CHECK_NR_ARGS( 8, args ) - a_operation = ELM_PLIST( args, 1 ); - a_k = ELM_PLIST( args, 2 ); - a_flags1 = ELM_PLIST( args, 3 ); - a_type2 = ELM_PLIST( args, 4 ); - a_type3 = ELM_PLIST( args, 5 ); - a_type4 = ELM_PLIST( args, 6 ); - a_type5 = ELM_PLIST( args, 7 ); - a_type6 = ELM_PLIST( args, 8 ); - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* methods := METHODS_OPERATION( operation, 6 ); */ - t_2 = GF_METHODS__OPERATION; - t_1 = CALL_2ARGS( t_2, a_operation, INTOBJ_INT(6) ); - CHECK_FUNC_RESULT( t_1 ) - l_methods = t_1; - - /* j := 0; */ - l_j = INTOBJ_INT(0); - - /* for i in [ 1 .. LEN_LIST( methods ) / 10 ] do */ - t_4 = GF_LEN__LIST; - t_3 = CALL_1ARGS( t_4, l_methods ); - CHECK_FUNC_RESULT( t_3 ) - t_2 = QUO( t_3, INTOBJ_INT(10) ); - CHECK_INT_SMALL( t_2 ) - for ( t_1 = INTOBJ_INT(1); - ((Int)t_1) <= ((Int)t_2); - t_1 = (Obj)(((UInt)t_1)+4) ) { - l_i = t_1; - - /* if IS_SUBSET_FLAGS( methods[10 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[10 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[10 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[10 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10 * (i - 1) + 6] ) and IS_SUBSET_FLAGS( type6![2], methods[10 * (i - 1) + 7] ) and methods[10 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1], type5![1], type6![1] ) then */ - t_11 = GF_IS__SUBSET__FLAGS; - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(10), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(2) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_10 = CALL_2ARGS( t_11, t_12, a_flags1 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_8 = t_9; - if ( t_8 ) { - t_12 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_13, a_type2, 2 ); - C_DIFF_INTOBJS( t_17, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_16, INTOBJ_INT(10), t_17 ) - C_SUM_FIA( t_15, t_16, INTOBJ_INT(3) ) - CHECK_INT_POS( t_15 ) - C_ELM_LIST_FPL( t_14, l_methods, t_15 ) - t_11 = CALL_2ARGS( t_12, t_13, t_14 ); - CHECK_FUNC_RESULT( t_11 ) - CHECK_BOOL( t_11 ) - t_10 = (Obj)(UInt)(t_11 != False); - t_8 = t_10; - } - t_7 = t_8; - if ( t_7 ) { - t_11 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_12, a_type3, 2 ); - C_DIFF_INTOBJS( t_16, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_15, INTOBJ_INT(10), t_16 ) - C_SUM_FIA( t_14, t_15, INTOBJ_INT(4) ) - CHECK_INT_POS( t_14 ) - C_ELM_LIST_FPL( t_13, l_methods, t_14 ) - t_10 = CALL_2ARGS( t_11, t_12, t_13 ); - CHECK_FUNC_RESULT( t_10 ) - CHECK_BOOL( t_10 ) - t_9 = (Obj)(UInt)(t_10 != False); - t_7 = t_9; - } - t_6 = t_7; - if ( t_6 ) { - t_10 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_11, a_type4, 2 ); - C_DIFF_INTOBJS( t_15, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_14, INTOBJ_INT(10), t_15 ) - C_SUM_FIA( t_13, t_14, INTOBJ_INT(5) ) - CHECK_INT_POS( t_13 ) - C_ELM_LIST_FPL( t_12, l_methods, t_13 ) - t_9 = CALL_2ARGS( t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_9 ) - CHECK_BOOL( t_9 ) - t_8 = (Obj)(UInt)(t_9 != False); - t_6 = t_8; - } - t_5 = t_6; - if ( t_5 ) { - t_9 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_10, a_type5, 2 ); - C_DIFF_INTOBJS( t_14, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_13, INTOBJ_INT(10), t_14 ) - C_SUM_FIA( t_12, t_13, INTOBJ_INT(6) ) - CHECK_INT_POS( t_12 ) - C_ELM_LIST_FPL( t_11, l_methods, t_12 ) - t_8 = CALL_2ARGS( t_9, t_10, t_11 ); - CHECK_FUNC_RESULT( t_8 ) - CHECK_BOOL( t_8 ) - t_7 = (Obj)(UInt)(t_8 != False); - t_5 = t_7; - } - t_4 = t_5; - if ( t_4 ) { - t_8 = GF_IS__SUBSET__FLAGS; - C_ELM_POSOBJ_NLE( t_9, a_type6, 2 ); - C_DIFF_INTOBJS( t_13, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_12, INTOBJ_INT(10), t_13 ) - C_SUM_FIA( t_11, t_12, INTOBJ_INT(7) ) - CHECK_INT_POS( t_11 ) - C_ELM_LIST_FPL( t_10, l_methods, t_11 ) - t_7 = CALL_2ARGS( t_8, t_9, t_10 ); - CHECK_FUNC_RESULT( t_7 ) - CHECK_BOOL( t_7 ) - t_6 = (Obj)(UInt)(t_7 != False); - t_4 = t_6; - } - t_3 = t_4; - if ( t_3 ) { - C_DIFF_INTOBJS( t_10, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_9, INTOBJ_INT(10), t_10 ) - C_SUM_FIA( t_8, t_9, INTOBJ_INT(1) ) - CHECK_INT_POS( t_8 ) - C_ELM_LIST_FPL( t_7, l_methods, t_8 ) - CHECK_FUNC( t_7 ) - C_ELM_POSOBJ_NLE( t_8, a_type2, 1 ); - C_ELM_POSOBJ_NLE( t_9, a_type3, 1 ); - C_ELM_POSOBJ_NLE( t_10, a_type4, 1 ); - C_ELM_POSOBJ_NLE( t_11, a_type5, 1 ); - C_ELM_POSOBJ_NLE( t_12, a_type6, 1 ); - t_6 = CALL_6ARGS( t_7, a_flags1, t_8, t_9, t_10, t_11, t_12 ); - CHECK_FUNC_RESULT( t_6 ) - CHECK_BOOL( t_6 ) - t_5 = (Obj)(UInt)(t_6 != False); - t_3 = t_5; - } - if ( t_3 ) { - - /* if k = j then */ - t_3 = (Obj)(UInt)(EQ( a_k, l_j )); - if ( t_3 ) { - - /* return methods[10 * (i - 1) + 8]; */ - C_DIFF_INTOBJS( t_6, l_i, INTOBJ_INT(1) ) - C_PROD_FIA( t_5, INTOBJ_INT(10), t_6 ) - C_SUM_FIA( t_4, t_5, INTOBJ_INT(8) ) - CHECK_INT_POS( t_4 ) - C_ELM_LIST_FPL( t_3, l_methods, t_4 ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_3; - - } - - /* else */ - else { - - /* j := j + 1; */ - C_SUM_FIA( t_3, l_j, INTOBJ_INT(1) ) - l_j = t_3; - - } - /* fi */ - - } - /* fi */ - - } - /* od */ - - /* return fail; */ - t_1 = GC_fail; - CHECK_BOUND( t_1, "fail" ) - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return t_1; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 34 */ -static Obj HdlrFunc34 ( - Obj self, - Obj a_arg ) -{ - Obj t_1 = 0; - Obj t_2 = 0; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* Error( "not supported yet" ); */ - t_1 = GF_Error; - t_2 = MakeString( "not supported yet" ); - CALL_1ARGS( t_1, t_2 ); - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* handler for function 1 */ -static Obj HdlrFunc1 ( - Obj self ) -{ - Obj t_1 = 0; - Obj t_2 = 0; - Bag oldFrame; - OLD_BRK_CURR_STAT - - /* allocate new stack frame */ - SWITCH_TO_NEW_FRAME(self,0,0,oldFrame); - REM_BRK_CURR_STAT(); - SET_BRK_CURR_STAT(0); - - /* METHOD_0ARGS := function ( operation ) - local methods, i; - methods := METHODS_OPERATION( operation, 0 ); - for i in [ 1, 5 .. LEN_LIST( methods ) - 3 ] do - if methods[i]( ) then - return methods[i + 1]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[2], 1, 0, HdlrFunc2 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 19); - SET_ENDLINE_BODY(t_2, 30); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_METHOD__0ARGS, t_1 ); - - /* METHOD_1ARGS := function ( operation, type1 ) - local methods, i; - methods := METHODS_OPERATION( operation, 1 ); - for i in [ 1, 6 .. LEN_LIST( methods ) - 4 ] do - if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and methods[i]( type1![1] ) then - return methods[i + 2]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[3], 2, 0, HdlrFunc3 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 37); - SET_ENDLINE_BODY(t_2, 49); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_METHOD__1ARGS, t_1 ); - - /* METHOD_2ARGS := function ( operation, type1, type2 ) - local methods, i; - methods := METHODS_OPERATION( operation, 2 ); - for i in [ 1, 7 .. LEN_LIST( methods ) - 5 ] do - if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and IS_SUBSET_FLAGS( type2![2], methods[i + 2] ) and methods[i]( type1![1], type2![1] ) then - return methods[i + 3]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[4], 3, 0, HdlrFunc4 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 56); - SET_ENDLINE_BODY(t_2, 69); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_METHOD__2ARGS, t_1 ); - - /* METHOD_3ARGS := function ( operation, type1, type2, type3 ) - local methods, i; - methods := METHODS_OPERATION( operation, 3 ); - for i in [ 1, 8 .. LEN_LIST( methods ) - 6 ] do - if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and IS_SUBSET_FLAGS( type2![2], methods[i + 2] ) and IS_SUBSET_FLAGS( type3![2], methods[i + 3] ) and methods[i]( type1![1], type2![1], type3![1] ) then - return methods[i + 4]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[5], 4, 0, HdlrFunc5 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 76); - SET_ENDLINE_BODY(t_2, 90); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_METHOD__3ARGS, t_1 ); - - /* METHOD_4ARGS := function ( operation, type1, type2, type3, type4 ) - local methods, i; - methods := METHODS_OPERATION( operation, 4 ); - for i in [ 1, 9 .. LEN_LIST( methods ) - 7 ] do - if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and IS_SUBSET_FLAGS( type2![2], methods[i + 2] ) and IS_SUBSET_FLAGS( type3![2], methods[i + 3] ) and IS_SUBSET_FLAGS( type4![2], methods[i + 4] ) - and methods[i]( type1![1], type2![1], type3![1], type4![1] ) then - return methods[i + 5]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[6], 5, 0, HdlrFunc6 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 97); - SET_ENDLINE_BODY(t_2, 114); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_METHOD__4ARGS, t_1 ); - - /* METHOD_5ARGS := function ( operation, type1, type2, type3, type4, type5 ) - local methods, i; - methods := METHODS_OPERATION( operation, 5 ); - for i in [ 1, 10 .. LEN_LIST( methods ) - 8 ] do - if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and IS_SUBSET_FLAGS( type2![2], methods[i + 2] ) and IS_SUBSET_FLAGS( type3![2], methods[i + 3] ) and IS_SUBSET_FLAGS( type4![2], methods[i + 4] ) and IS_SUBSET_FLAGS( type5![2], methods[i + 5] ) - and methods[i]( type1![1], type2![1], type3![1], type4![1], type5![1] ) then - return methods[i + 6]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[7], 6, 0, HdlrFunc7 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 121); - SET_ENDLINE_BODY(t_2, 139); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_METHOD__5ARGS, t_1 ); - - /* METHOD_6ARGS := function ( operation, type1, type2, type3, type4, type5, type6 ) - local methods, i; - methods := METHODS_OPERATION( operation, 6 ); - for i in [ 1, 11 .. LEN_LIST( methods ) - 9 ] do - if IS_SUBSET_FLAGS( type1![2], methods[i + 1] ) and IS_SUBSET_FLAGS( type2![2], methods[i + 2] ) and IS_SUBSET_FLAGS( type3![2], methods[i + 3] ) and IS_SUBSET_FLAGS( type4![2], methods[i + 4] ) and IS_SUBSET_FLAGS( type5![2], methods[i + 5] ) - and IS_SUBSET_FLAGS( type6![2], methods[i + 6] ) and methods[i]( type1![1], type2![1], type3![1], type4![1], type5![1], type6![1] ) then - return methods[i + 7]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[8], 7, 0, HdlrFunc8 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 146); - SET_ENDLINE_BODY(t_2, 165); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_METHOD__6ARGS, t_1 ); - - /* METHOD_XARGS := function ( arg... ) - Error( "not supported yet" ); - return; - end; */ - t_1 = NewFunction( NameFunc[9], -1, 0, HdlrFunc9 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 172); - SET_ENDLINE_BODY(t_2, 174); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_METHOD__XARGS, t_1 ); - - /* NEXT_METHOD_0ARGS := function ( operation, k ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 0 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 4 ] do - if methods[4 * (i - 1) + 1]( ) then - if k = j then - return methods[4 * (i - 1) + 2]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[10], 2, 0, HdlrFunc10 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 189); - SET_ENDLINE_BODY(t_2, 205); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__METHOD__0ARGS, t_1 ); - - /* NEXT_METHOD_1ARGS := function ( operation, k, type1 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 1 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 5 ] do - if IS_SUBSET_FLAGS( type1![2], methods[5 * (i - 1) + 2] ) and methods[5 * (i - 1) + 1]( type1![1] ) then - if k = j then - return methods[5 * (i - 1) + 3]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[11], 3, 0, HdlrFunc11 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 212); - SET_ENDLINE_BODY(t_2, 229); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__METHOD__1ARGS, t_1 ); - - /* NEXT_METHOD_2ARGS := function ( operation, k, type1, type2 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 2 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 6 ] do - if IS_SUBSET_FLAGS( type1![2], methods[6 * (i - 1) + 2] ) and IS_SUBSET_FLAGS( type2![2], methods[6 * (i - 1) + 3] ) and methods[6 * (i - 1) + 1]( type1![1], type2![1] ) then - if k = j then - return methods[6 * (i - 1) + 4]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[12], 4, 0, HdlrFunc12 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 236); - SET_ENDLINE_BODY(t_2, 254); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__METHOD__2ARGS, t_1 ); - - /* NEXT_METHOD_3ARGS := function ( operation, k, type1, type2, type3 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 3 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 7 ] do - if IS_SUBSET_FLAGS( type1![2], methods[7 * (i - 1) + 2] ) and IS_SUBSET_FLAGS( type2![2], methods[7 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[7 * (i - 1) + 4] ) and methods[7 * (i - 1) + 1]( type1![1], type2![1], type3![1] ) - then - if k = j then - return methods[7 * (i - 1) + 5]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[13], 5, 0, HdlrFunc13 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 261); - SET_ENDLINE_BODY(t_2, 280); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__METHOD__3ARGS, t_1 ); - - /* NEXT_METHOD_4ARGS := function ( operation, k, type1, type2, type3, type4 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 4 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 8 ] do - if IS_SUBSET_FLAGS( type1![2], methods[8 * (i - 1) + 2] ) and IS_SUBSET_FLAGS( type2![2], methods[8 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[8 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[8 * (i - 1) + 5] ) - and methods[8 * (i - 1) + 1]( type1![1], type2![1], type3![1], type4![1] ) then - if k = j then - return methods[8 * (i - 1) + 6]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[14], 6, 0, HdlrFunc14 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 287); - SET_ENDLINE_BODY(t_2, 309); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__METHOD__4ARGS, t_1 ); - - /* NEXT_METHOD_5ARGS := function ( operation, k, type1, type2, type3, type4, type5 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 5 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 9 ] do - if IS_SUBSET_FLAGS( type1![2], methods[9 * (i - 1) + 2] ) and IS_SUBSET_FLAGS( type2![2], methods[9 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[9 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[9 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9 * (i - 1) + 6] ) and methods[9 * (i - 1) + 1]( type1![1], type2![1], type3![1], type4![1], type5![1] ) then - if k = j then - return methods[9 * (i - 1) + 7]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[15], 7, 0, HdlrFunc15 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 316); - SET_ENDLINE_BODY(t_2, 339); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__METHOD__5ARGS, t_1 ); - - /* NEXT_METHOD_6ARGS := function ( operation, k, type1, type2, type3, type4, type5, type6 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 6 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 10 ] do - if IS_SUBSET_FLAGS( type1![2], methods[10 * (i - 1) + 2] ) and IS_SUBSET_FLAGS( type2![2], methods[10 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[10 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[10 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10 * (i - 1) + 6] ) and IS_SUBSET_FLAGS( type6![2], methods[10 * (i - 1) + 7] ) and methods[10 * (i - 1) + 1]( type1![1], type2![1], type3![1], type4![1], type5![1], type6![1] ) then - if k = j then - return methods[10 * (i - 1) + 8]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[16], 8, 0, HdlrFunc16 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 346); - SET_ENDLINE_BODY(t_2, 370); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__METHOD__6ARGS, t_1 ); - - /* NEXT_METHOD_XARGS := function ( arg... ) - Error( "not supported yet" ); - return; - end; */ - t_1 = NewFunction( NameFunc[17], -1, 0, HdlrFunc17 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 377); - SET_ENDLINE_BODY(t_2, 379); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__METHOD__XARGS, t_1 ); - - /* AttributeValueNotSet := function ( attr, obj ) - local type, fam, methods, i, flag, erg; - type := TypeObj( obj ); - fam := FamilyObj( obj ); - methods := METHODS_OPERATION( attr, 1 ); - for i in [ 1 .. LEN_LIST( methods ) / 5 ] do - flag := true; - flag := flag and IS_SUBSET_FLAGS( type![2], methods[5 * (i - 1) + 2] ); - if flag then - flag := flag and methods[5 * (i - 1) + 1]( fam ); - fi; - if flag then - attr := methods[5 * (i - 1) + 3]; - erg := attr( obj ); - if not IS_IDENTICAL_OBJ( erg, TRY_NEXT_METHOD ) then - return erg; - fi; - fi; - od; - Error( "No applicable method found for attribute" ); - return; - end; */ - t_1 = NewFunction( NameFunc[18], 2, 0, HdlrFunc18 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 385); - SET_ENDLINE_BODY(t_2, 406); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_AttributeValueNotSet, t_1 ); - - /* CONSTRUCTOR_0ARGS := function ( operation ) - local methods, i; - methods := METHODS_OPERATION( operation, 0 ); - for i in [ 1 .. LEN_LIST( methods ) / 4 ] do - if methods[4 * (i - 1) + 1]( ) then - return methods[4 * (i - 1) + 2]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[19], 1, 0, HdlrFunc19 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 419); - SET_ENDLINE_BODY(t_2, 430); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_CONSTRUCTOR__0ARGS, t_1 ); - - /* CONSTRUCTOR_1ARGS := function ( operation, flags1 ) - local methods, i; - methods := METHODS_OPERATION( operation, 1 ); - for i in [ 1 .. LEN_LIST( methods ) / 5 ] do - if IS_SUBSET_FLAGS( methods[5 * (i - 1) + 2], flags1 ) and methods[5 * (i - 1) + 1]( flags1 ) then - return methods[5 * (i - 1) + 3]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[20], 2, 0, HdlrFunc20 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 437); - SET_ENDLINE_BODY(t_2, 449); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_CONSTRUCTOR__1ARGS, t_1 ); - - /* CONSTRUCTOR_2ARGS := function ( operation, flags1, type2 ) - local methods, i; - methods := METHODS_OPERATION( operation, 2 ); - for i in [ 1 .. LEN_LIST( methods ) / 6 ] do - if IS_SUBSET_FLAGS( methods[6 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[6 * (i - 1) + 3] ) and methods[6 * (i - 1) + 1]( flags1, type2![1] ) then - return methods[6 * (i - 1) + 4]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[21], 3, 0, HdlrFunc21 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 456); - SET_ENDLINE_BODY(t_2, 469); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_CONSTRUCTOR__2ARGS, t_1 ); - - /* CONSTRUCTOR_3ARGS := function ( operation, flags1, type2, type3 ) - local methods, i; - methods := METHODS_OPERATION( operation, 3 ); - for i in [ 1 .. LEN_LIST( methods ) / 7 ] do - if IS_SUBSET_FLAGS( methods[7 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[7 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[7 * (i - 1) + 4] ) and methods[7 * (i - 1) + 1]( flags1, type2![1], type3![1] ) then - return methods[7 * (i - 1) + 5]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[22], 4, 0, HdlrFunc22 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 476); - SET_ENDLINE_BODY(t_2, 490); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_CONSTRUCTOR__3ARGS, t_1 ); - - /* CONSTRUCTOR_4ARGS := function ( operation, flags1, type2, type3, type4 ) - local methods, i; - methods := METHODS_OPERATION( operation, 4 ); - for i in [ 1 .. LEN_LIST( methods ) / 8 ] do - if IS_SUBSET_FLAGS( methods[8 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[8 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[8 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[8 * (i - 1) + 5] ) - and methods[8 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1] ) then - return methods[8 * (i - 1) + 6]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[23], 5, 0, HdlrFunc23 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 497); - SET_ENDLINE_BODY(t_2, 514); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_CONSTRUCTOR__4ARGS, t_1 ); - - /* CONSTRUCTOR_5ARGS := function ( operation, flags1, type2, type3, type4, type5 ) - local methods, i; - methods := METHODS_OPERATION( operation, 5 ); - for i in [ 1 .. LEN_LIST( methods ) / 9 ] do - if IS_SUBSET_FLAGS( methods[9 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[9 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[9 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[9 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9 * (i - 1) + 6] ) and methods[9 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1], type5![1] ) then - return methods[9 * (i - 1) + 7]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[24], 6, 0, HdlrFunc24 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 521); - SET_ENDLINE_BODY(t_2, 539); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_CONSTRUCTOR__5ARGS, t_1 ); - - /* CONSTRUCTOR_6ARGS := function ( operation, flags1, type2, type3, type4, type5, type6 ) - local methods, i; - methods := METHODS_OPERATION( operation, 6 ); - for i in [ 1 .. LEN_LIST( methods ) / 10 ] do - if IS_SUBSET_FLAGS( methods[10 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[10 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[10 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[10 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10 * (i - 1) + 6] ) and IS_SUBSET_FLAGS( type6![2], methods[10 * (i - 1) + 7] ) and methods[10 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1], type5![1], type6![1] ) then - return methods[10 * (i - 1) + 8]; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[25], 7, 0, HdlrFunc25 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 546); - SET_ENDLINE_BODY(t_2, 565); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_CONSTRUCTOR__6ARGS, t_1 ); - - /* CONSTRUCTOR_XARGS := function ( arg... ) - Error( "not supported yet" ); - return; - end; */ - t_1 = NewFunction( NameFunc[26], -1, 0, HdlrFunc26 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 572); - SET_ENDLINE_BODY(t_2, 574); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_CONSTRUCTOR__XARGS, t_1 ); - - /* NEXT_CONSTRUCTOR_0ARGS := function ( operation, k ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 0 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 4 ] do - if methods[4 * (i - 1) + 1]( ) then - if k = j then - return methods[4 * (i - 1) + 2]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[27], 2, 0, HdlrFunc27 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 589); - SET_ENDLINE_BODY(t_2, 605); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__CONSTRUCTOR__0ARGS, t_1 ); - - /* NEXT_CONSTRUCTOR_1ARGS := function ( operation, k, flags1 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 1 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 5 ] do - if IS_SUBSET_FLAGS( methods[5 * (i - 1) + 2], flags1 ) and methods[5 * (i - 1) + 1]( flags1 ) then - if k = j then - return methods[5 * (i - 1) + 3]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[28], 3, 0, HdlrFunc28 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 612); - SET_ENDLINE_BODY(t_2, 629); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__CONSTRUCTOR__1ARGS, t_1 ); - - /* NEXT_CONSTRUCTOR_2ARGS := function ( operation, k, flags1, type2 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 2 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 6 ] do - if IS_SUBSET_FLAGS( methods[6 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[6 * (i - 1) + 3] ) and methods[6 * (i - 1) + 1]( flags1, type2![1] ) then - if k = j then - return methods[6 * (i - 1) + 4]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[29], 4, 0, HdlrFunc29 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 636); - SET_ENDLINE_BODY(t_2, 654); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__CONSTRUCTOR__2ARGS, t_1 ); - - /* NEXT_CONSTRUCTOR_3ARGS := function ( operation, k, flags1, type2, type3 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 3 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 7 ] do - if IS_SUBSET_FLAGS( methods[7 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[7 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[7 * (i - 1) + 4] ) and methods[7 * (i - 1) + 1]( flags1, type2![1], type3![1] ) then - if k = j then - return methods[7 * (i - 1) + 5]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[30], 5, 0, HdlrFunc30 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 661); - SET_ENDLINE_BODY(t_2, 680); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__CONSTRUCTOR__3ARGS, t_1 ); - - /* NEXT_CONSTRUCTOR_4ARGS := function ( operation, k, flags1, type2, type3, type4 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 4 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 8 ] do - if IS_SUBSET_FLAGS( methods[8 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[8 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[8 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[8 * (i - 1) + 5] ) - and methods[8 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1] ) then - if k = j then - return methods[8 * (i - 1) + 6]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[31], 6, 0, HdlrFunc31 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 687); - SET_ENDLINE_BODY(t_2, 709); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__CONSTRUCTOR__4ARGS, t_1 ); - - /* NEXT_CONSTRUCTOR_5ARGS := function ( operation, k, flags1, type2, type3, type4, type5 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 5 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 9 ] do - if IS_SUBSET_FLAGS( methods[9 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[9 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[9 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[9 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[9 * (i - 1) + 6] ) and methods[9 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1], type5![1] ) then - if k = j then - return methods[9 * (i - 1) + 7]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[32], 7, 0, HdlrFunc32 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 716); - SET_ENDLINE_BODY(t_2, 739); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__CONSTRUCTOR__5ARGS, t_1 ); - - /* NEXT_CONSTRUCTOR_6ARGS := function ( operation, k, flags1, type2, type3, type4, type5, type6 ) - local methods, i, j; - methods := METHODS_OPERATION( operation, 6 ); - j := 0; - for i in [ 1 .. LEN_LIST( methods ) / 10 ] do - if IS_SUBSET_FLAGS( methods[10 * (i - 1) + 2], flags1 ) and IS_SUBSET_FLAGS( type2![2], methods[10 * (i - 1) + 3] ) and IS_SUBSET_FLAGS( type3![2], methods[10 * (i - 1) + 4] ) and IS_SUBSET_FLAGS( type4![2], methods[10 * (i - 1) + 5] ) - and IS_SUBSET_FLAGS( type5![2], methods[10 * (i - 1) + 6] ) and IS_SUBSET_FLAGS( type6![2], methods[10 * (i - 1) + 7] ) and methods[10 * (i - 1) + 1]( flags1, type2![1], type3![1], type4![1], type5![1], type6![1] ) then - if k = j then - return methods[10 * (i - 1) + 8]; - else - j := j + 1; - fi; - fi; - od; - return fail; - end; */ - t_1 = NewFunction( NameFunc[33], 8, 0, HdlrFunc33 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 746); - SET_ENDLINE_BODY(t_2, 770); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__CONSTRUCTOR__6ARGS, t_1 ); - - /* NEXT_CONSTRUCTOR_XARGS := function ( arg... ) - Error( "not supported yet" ); - return; - end; */ - t_1 = NewFunction( NameFunc[34], -1, 0, HdlrFunc34 ); - SET_ENVI_FUNC( t_1, STATE(CurrLVars) ); - t_2 = NewBag( T_BODY, sizeof(BodyHeader) ); - SET_STARTLINE_BODY(t_2, 777); - SET_ENDLINE_BODY(t_2, 779); - SET_FILENAME_BODY(t_2, FileName); - SET_BODY_FUNC(t_1, t_2); - CHANGED_BAG( STATE(CurrLVars) ); - AssGVar( G_NEXT__CONSTRUCTOR__XARGS, t_1 ); - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; - - /* return; */ - RES_BRK_CURR_STAT(); - SWITCH_TO_OLD_FRAME(oldFrame); - return 0; -} - -/* 'PostRestore' restore gvars, rnams, functions */ -static Int PostRestore ( StructInitInfo * module ) -{ - - /* global variables used in handlers */ - G_METHOD__0ARGS = GVarName( "METHOD_0ARGS" ); - G_METHOD__1ARGS = GVarName( "METHOD_1ARGS" ); - G_METHOD__2ARGS = GVarName( "METHOD_2ARGS" ); - G_METHOD__3ARGS = GVarName( "METHOD_3ARGS" ); - G_METHOD__4ARGS = GVarName( "METHOD_4ARGS" ); - G_METHOD__5ARGS = GVarName( "METHOD_5ARGS" ); - G_METHOD__6ARGS = GVarName( "METHOD_6ARGS" ); - G_NEXT__METHOD__0ARGS = GVarName( "NEXT_METHOD_0ARGS" ); - G_NEXT__METHOD__1ARGS = GVarName( "NEXT_METHOD_1ARGS" ); - G_NEXT__METHOD__2ARGS = GVarName( "NEXT_METHOD_2ARGS" ); - G_NEXT__METHOD__3ARGS = GVarName( "NEXT_METHOD_3ARGS" ); - G_NEXT__METHOD__4ARGS = GVarName( "NEXT_METHOD_4ARGS" ); - G_NEXT__METHOD__5ARGS = GVarName( "NEXT_METHOD_5ARGS" ); - G_NEXT__METHOD__6ARGS = GVarName( "NEXT_METHOD_6ARGS" ); - G_CONSTRUCTOR__0ARGS = GVarName( "CONSTRUCTOR_0ARGS" ); - G_CONSTRUCTOR__1ARGS = GVarName( "CONSTRUCTOR_1ARGS" ); - G_CONSTRUCTOR__2ARGS = GVarName( "CONSTRUCTOR_2ARGS" ); - G_CONSTRUCTOR__3ARGS = GVarName( "CONSTRUCTOR_3ARGS" ); - G_CONSTRUCTOR__4ARGS = GVarName( "CONSTRUCTOR_4ARGS" ); - G_CONSTRUCTOR__5ARGS = GVarName( "CONSTRUCTOR_5ARGS" ); - G_CONSTRUCTOR__6ARGS = GVarName( "CONSTRUCTOR_6ARGS" ); - G_NEXT__CONSTRUCTOR__0ARGS = GVarName( "NEXT_CONSTRUCTOR_0ARGS" ); - G_NEXT__CONSTRUCTOR__1ARGS = GVarName( "NEXT_CONSTRUCTOR_1ARGS" ); - G_NEXT__CONSTRUCTOR__2ARGS = GVarName( "NEXT_CONSTRUCTOR_2ARGS" ); - G_NEXT__CONSTRUCTOR__3ARGS = GVarName( "NEXT_CONSTRUCTOR_3ARGS" ); - G_NEXT__CONSTRUCTOR__4ARGS = GVarName( "NEXT_CONSTRUCTOR_4ARGS" ); - G_NEXT__CONSTRUCTOR__5ARGS = GVarName( "NEXT_CONSTRUCTOR_5ARGS" ); - G_NEXT__CONSTRUCTOR__6ARGS = GVarName( "NEXT_CONSTRUCTOR_6ARGS" ); - G_Error = GVarName( "Error" ); - G_IS__IDENTICAL__OBJ = GVarName( "IS_IDENTICAL_OBJ" ); - G_TRY__NEXT__METHOD = GVarName( "TRY_NEXT_METHOD" ); - G_IS__SUBSET__FLAGS = GVarName( "IS_SUBSET_FLAGS" ); - G_METHODS__OPERATION = GVarName( "METHODS_OPERATION" ); - G_fail = GVarName( "fail" ); - G_LEN__LIST = GVarName( "LEN_LIST" ); - G_METHOD__XARGS = GVarName( "METHOD_XARGS" ); - G_NEXT__METHOD__XARGS = GVarName( "NEXT_METHOD_XARGS" ); - G_AttributeValueNotSet = GVarName( "AttributeValueNotSet" ); - G_TypeObj = GVarName( "TypeObj" ); - G_FamilyObj = GVarName( "FamilyObj" ); - G_CONSTRUCTOR__XARGS = GVarName( "CONSTRUCTOR_XARGS" ); - G_NEXT__CONSTRUCTOR__XARGS = GVarName( "NEXT_CONSTRUCTOR_XARGS" ); - - /* record names used in handlers */ - - /* information for the functions */ - NameFunc[1] = 0; - NameFunc[2] = 0; - NameFunc[3] = 0; - NameFunc[4] = 0; - NameFunc[5] = 0; - NameFunc[6] = 0; - NameFunc[7] = 0; - NameFunc[8] = 0; - NameFunc[9] = 0; - NameFunc[10] = 0; - NameFunc[11] = 0; - NameFunc[12] = 0; - NameFunc[13] = 0; - NameFunc[14] = 0; - NameFunc[15] = 0; - NameFunc[16] = 0; - NameFunc[17] = 0; - NameFunc[18] = 0; - NameFunc[19] = 0; - NameFunc[20] = 0; - NameFunc[21] = 0; - NameFunc[22] = 0; - NameFunc[23] = 0; - NameFunc[24] = 0; - NameFunc[25] = 0; - NameFunc[26] = 0; - NameFunc[27] = 0; - NameFunc[28] = 0; - NameFunc[29] = 0; - NameFunc[30] = 0; - NameFunc[31] = 0; - NameFunc[32] = 0; - NameFunc[33] = 0; - NameFunc[34] = 0; - - /* return success */ - return 0; - -} - - -/* 'InitKernel' sets up data structures, fopies, copies, handlers */ -static Int InitKernel ( StructInitInfo * module ) -{ - - /* global variables used in handlers */ - InitFopyGVar( "Error", &GF_Error ); - InitFopyGVar( "IS_IDENTICAL_OBJ", &GF_IS__IDENTICAL__OBJ ); - InitCopyGVar( "TRY_NEXT_METHOD", &GC_TRY__NEXT__METHOD ); - InitFopyGVar( "IS_SUBSET_FLAGS", &GF_IS__SUBSET__FLAGS ); - InitFopyGVar( "METHODS_OPERATION", &GF_METHODS__OPERATION ); - InitCopyGVar( "fail", &GC_fail ); - InitFopyGVar( "LEN_LIST", &GF_LEN__LIST ); - InitFopyGVar( "TypeObj", &GF_TypeObj ); - InitFopyGVar( "FamilyObj", &GF_FamilyObj ); - - /* information for the functions */ - InitGlobalBag( &FileName, "GAPROOT/lib/methsel1.g:FileName("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc1, "GAPROOT/lib/methsel1.g:HdlrFunc1("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[1]), "GAPROOT/lib/methsel1.g:NameFunc[1]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc2, "GAPROOT/lib/methsel1.g:HdlrFunc2("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[2]), "GAPROOT/lib/methsel1.g:NameFunc[2]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc3, "GAPROOT/lib/methsel1.g:HdlrFunc3("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[3]), "GAPROOT/lib/methsel1.g:NameFunc[3]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc4, "GAPROOT/lib/methsel1.g:HdlrFunc4("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[4]), "GAPROOT/lib/methsel1.g:NameFunc[4]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc5, "GAPROOT/lib/methsel1.g:HdlrFunc5("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[5]), "GAPROOT/lib/methsel1.g:NameFunc[5]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc6, "GAPROOT/lib/methsel1.g:HdlrFunc6("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[6]), "GAPROOT/lib/methsel1.g:NameFunc[6]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc7, "GAPROOT/lib/methsel1.g:HdlrFunc7("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[7]), "GAPROOT/lib/methsel1.g:NameFunc[7]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc8, "GAPROOT/lib/methsel1.g:HdlrFunc8("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[8]), "GAPROOT/lib/methsel1.g:NameFunc[8]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc9, "GAPROOT/lib/methsel1.g:HdlrFunc9("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[9]), "GAPROOT/lib/methsel1.g:NameFunc[9]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc10, "GAPROOT/lib/methsel1.g:HdlrFunc10("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[10]), "GAPROOT/lib/methsel1.g:NameFunc[10]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc11, "GAPROOT/lib/methsel1.g:HdlrFunc11("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[11]), "GAPROOT/lib/methsel1.g:NameFunc[11]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc12, "GAPROOT/lib/methsel1.g:HdlrFunc12("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[12]), "GAPROOT/lib/methsel1.g:NameFunc[12]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc13, "GAPROOT/lib/methsel1.g:HdlrFunc13("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[13]), "GAPROOT/lib/methsel1.g:NameFunc[13]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc14, "GAPROOT/lib/methsel1.g:HdlrFunc14("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[14]), "GAPROOT/lib/methsel1.g:NameFunc[14]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc15, "GAPROOT/lib/methsel1.g:HdlrFunc15("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[15]), "GAPROOT/lib/methsel1.g:NameFunc[15]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc16, "GAPROOT/lib/methsel1.g:HdlrFunc16("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[16]), "GAPROOT/lib/methsel1.g:NameFunc[16]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc17, "GAPROOT/lib/methsel1.g:HdlrFunc17("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[17]), "GAPROOT/lib/methsel1.g:NameFunc[17]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc18, "GAPROOT/lib/methsel1.g:HdlrFunc18("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[18]), "GAPROOT/lib/methsel1.g:NameFunc[18]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc19, "GAPROOT/lib/methsel1.g:HdlrFunc19("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[19]), "GAPROOT/lib/methsel1.g:NameFunc[19]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc20, "GAPROOT/lib/methsel1.g:HdlrFunc20("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[20]), "GAPROOT/lib/methsel1.g:NameFunc[20]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc21, "GAPROOT/lib/methsel1.g:HdlrFunc21("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[21]), "GAPROOT/lib/methsel1.g:NameFunc[21]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc22, "GAPROOT/lib/methsel1.g:HdlrFunc22("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[22]), "GAPROOT/lib/methsel1.g:NameFunc[22]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc23, "GAPROOT/lib/methsel1.g:HdlrFunc23("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[23]), "GAPROOT/lib/methsel1.g:NameFunc[23]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc24, "GAPROOT/lib/methsel1.g:HdlrFunc24("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[24]), "GAPROOT/lib/methsel1.g:NameFunc[24]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc25, "GAPROOT/lib/methsel1.g:HdlrFunc25("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[25]), "GAPROOT/lib/methsel1.g:NameFunc[25]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc26, "GAPROOT/lib/methsel1.g:HdlrFunc26("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[26]), "GAPROOT/lib/methsel1.g:NameFunc[26]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc27, "GAPROOT/lib/methsel1.g:HdlrFunc27("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[27]), "GAPROOT/lib/methsel1.g:NameFunc[27]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc28, "GAPROOT/lib/methsel1.g:HdlrFunc28("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[28]), "GAPROOT/lib/methsel1.g:NameFunc[28]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc29, "GAPROOT/lib/methsel1.g:HdlrFunc29("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[29]), "GAPROOT/lib/methsel1.g:NameFunc[29]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc30, "GAPROOT/lib/methsel1.g:HdlrFunc30("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[30]), "GAPROOT/lib/methsel1.g:NameFunc[30]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc31, "GAPROOT/lib/methsel1.g:HdlrFunc31("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[31]), "GAPROOT/lib/methsel1.g:NameFunc[31]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc32, "GAPROOT/lib/methsel1.g:HdlrFunc32("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[32]), "GAPROOT/lib/methsel1.g:NameFunc[32]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc33, "GAPROOT/lib/methsel1.g:HdlrFunc33("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[33]), "GAPROOT/lib/methsel1.g:NameFunc[33]("FILE_CRC")" ); - InitHandlerFunc( HdlrFunc34, "GAPROOT/lib/methsel1.g:HdlrFunc34("FILE_CRC")" ); - InitGlobalBag( &(NameFunc[34]), "GAPROOT/lib/methsel1.g:NameFunc[34]("FILE_CRC")" ); - - /* return success */ - return 0; - -} - -/* 'InitLibrary' sets up gvars, rnams, functions */ -static Int InitLibrary ( StructInitInfo * module ) -{ - Obj func1; - Obj body1; - - /* Complete Copy/Fopy registration */ - UpdateCopyFopyInfo(); - FileName = MakeImmString( "GAPROOT/lib/methsel1.g" ); - PostRestore(module); - - /* create all the functions defined in this module */ - func1 = NewFunction(NameFunc[1],0,0,HdlrFunc1); - SET_ENVI_FUNC( func1, STATE(CurrLVars) ); - CHANGED_BAG( STATE(CurrLVars) ); - body1 = NewBag( T_BODY, sizeof(BodyHeader)); - SET_BODY_FUNC( func1, body1 ); - CHANGED_BAG( func1 ); - CALL_0ARGS( func1 ); - - /* return success */ - return 0; - -} - -/* returns the description of this module */ -static StructInitInfo module = { - .type = MODULE_STATIC, - .name = "GAPROOT/lib/methsel1.g", - .crc = 102657344, - .initKernel = InitKernel, - .initLibrary = InitLibrary, - .postRestore = PostRestore, -}; - -StructInitInfo * Init__methsel1 ( void ) -{ - return &module; -} - -/* compiled code ends here */ -#endif diff --git a/src/compstat.c b/src/compstat.c index 8fe04ad139..b52a48e2fe 100644 --- a/src/compstat.c +++ b/src/compstat.c @@ -21,14 +21,12 @@ ** This a dummy list in case no module is statically linked. */ #ifndef AVOID_PRECOMPILED -extern StructInitInfo * Init__methsel1 ( void ); extern StructInitInfo * Init__type1 ( void ); extern StructInitInfo * Init__oper1( void ); #endif InitInfoFunc CompInitFuncs [] = { #ifndef AVOID_PRECOMPILED - Init__methsel1, Init__type1, Init__oper1, #endif diff --git a/src/gapstate.h b/src/gapstate.h index ac89a043db..ea114bd2f5 100644 --- a/src/gapstate.h +++ b/src/gapstate.h @@ -98,7 +98,6 @@ typedef struct GAPState { Obj * MethodCacheItems; UInt MethodCacheSize; #endif - UInt CacheIndex; /* From gap.c */ Obj ThrownObject; diff --git a/src/opers.c b/src/opers.c index 70ebadf43e..88be93cb8a 100644 --- a/src/opers.c +++ b/src/opers.c @@ -442,10 +442,9 @@ static Int IsSubsetFlagsCalls2; /**************************************************************************** ** -*F UncheckedIS_SUBSET_FLAGS( , ) subset test with -*F no safety check +*F IS_SUBSET_FLAGS( , ) . subset test with no safety check */ -static Obj UncheckedIS_SUBSET_FLAGS(Obj flags1, Obj flags2) +static Int IS_SUBSET_FLAGS(Obj flags1, Obj flags2) { Int len1; Int len2; @@ -468,11 +467,11 @@ static Obj UncheckedIS_SUBSET_FLAGS(Obj flags1, Obj flags2) #ifdef COUNT_OPERS IsSubsetFlagsCalls1++; #endif - return False; + return 0; } } if (len2 == 0) { - return True; + return 1; } /* If flags2 has only a "few" set bits then the best way is to @@ -485,14 +484,14 @@ static Obj UncheckedIS_SUBSET_FLAGS(Obj flags1, Obj flags2) IsSubsetFlagsCalls2++; #endif if (LEN_FLAGS(flags1) < INT_INTOBJ(ELM_PLIST(trues, len2))) { - return False; + return 0; } for (i = len2; 0 < i; i--) { if (!C_ELM_FLAGS(flags1, INT_INTOBJ(ELM_PLIST(trues, i)))) { - return False; + return 0; } } - return True; + return 1; } } @@ -504,22 +503,22 @@ static Obj UncheckedIS_SUBSET_FLAGS(Obj flags1, Obj flags2) if (len1 < len2) { for (i = len2 - 1; i >= len1; i--) { if (ptr2[i] != 0) - return False; + return 0; } for (i = len1 - 1; i >= 0; i--) { UInt x = ptr2[i]; if ((x & ptr1[i]) != x) - return False; + return 0; } } else { for (i = len2 - 1; i >= 0; i--) { UInt x = ptr2[i]; if ((x & ptr1[i]) != x) - return False; + return 0; } } - return True; + return 1; } /**************************************************************************** @@ -543,7 +542,7 @@ Obj FuncIS_SUBSET_FLAGS ( "you can replace via 'return ;'" ); } - return UncheckedIS_SUBSET_FLAGS(flags1, flags2); + return IS_SUBSET_FLAGS(flags1, flags2) ? True : False; } /**************************************************************************** @@ -844,8 +843,7 @@ static Int WITH_HIDDEN_IMPS_HIT=0; #endif Obj FuncWITH_HIDDEN_IMPS_FLAGS(Obj self, Obj flags) { - /* do some trivial checks - we have to do this so we can use - * UncheckedIS_SUBSET_FLAGS */ + // do some trivial checks, so we can use IS_SUBSET_FLAGS while ( TNUM_OBJ(flags) != T_FLAGS ) { flags = ErrorReturnObj( " must be a flags list (not a %s)", (Int)TNAM_OBJ(flags), 0L, @@ -891,8 +889,8 @@ Obj FuncWITH_HIDDEN_IMPS_FLAGS(Obj self, Obj flags) changed = 0; for (i = hidden_imps_length, stop = lastand; i > stop; i--) { - if( UncheckedIS_SUBSET_FLAGS(with, ELM_PLIST(HIDDEN_IMPS, i*2)) == True && - UncheckedIS_SUBSET_FLAGS(with, ELM_PLIST(HIDDEN_IMPS, i*2-1)) != True ) + if( IS_SUBSET_FLAGS(with, ELM_PLIST(HIDDEN_IMPS, i*2)) && + !IS_SUBSET_FLAGS(with, ELM_PLIST(HIDDEN_IMPS, i*2-1)) ) { with = FuncAND_FLAGS(0, with, ELM_PLIST(HIDDEN_IMPS, i*2-1)); changed = 1; @@ -973,8 +971,7 @@ static Int WITH_IMPS_FLAGS_HIT=0; #endif Obj FuncWITH_IMPS_FLAGS(Obj self, Obj flags) { - /* do some trivial checks - we have to do this so we can use - * UncheckedIS_SUBSET_FLAGS */ + // do some trivial checks, so we can use IS_SUBSET_FLAGS while ( TNUM_OBJ(flags) != T_FLAGS ) { flags = ErrorReturnObj( " must be a flags list (not a %s)", (Int)TNAM_OBJ(flags), 0L, @@ -1021,8 +1018,8 @@ Obj FuncWITH_IMPS_FLAGS(Obj self, Obj flags) if (j <= LEN_PLIST(IMPLICATIONS_SIMPLE) && ELM_PLIST(IMPLICATIONS_SIMPLE, j)) { imp = ELM_PLIST(IMPLICATIONS_SIMPLE, j); - if( UncheckedIS_SUBSET_FLAGS(with, ELM_PLIST(imp, 2)) == True && - UncheckedIS_SUBSET_FLAGS(with, ELM_PLIST(imp, 1)) != True ) + if( IS_SUBSET_FLAGS(with, ELM_PLIST(imp, 2)) && + !IS_SUBSET_FLAGS(with, ELM_PLIST(imp, 1)) ) { with = FuncAND_FLAGS(0, with, ELM_PLIST(imp, 1)); } @@ -1039,8 +1036,8 @@ Obj FuncWITH_IMPS_FLAGS(Obj self, Obj flags) for (i = 1, stop = lastand; i < stop; i++) { imp = ELM_PLIST(IMPLICATIONS_COMPOSED, i); - if( UncheckedIS_SUBSET_FLAGS(with, ELM_PLIST(imp, 2)) == True && - UncheckedIS_SUBSET_FLAGS(with, ELM_PLIST(imp, 1)) != True ) + if( IS_SUBSET_FLAGS(with, ELM_PLIST(imp, 2)) && + !IS_SUBSET_FLAGS(with, ELM_PLIST(imp, 1)) ) { with = FuncAND_FLAGS(0, with, ELM_PLIST(imp, 1)); changed = 1; @@ -1811,17 +1808,15 @@ Obj FuncCOMPACT_TYPE_IDS( Obj self ) ** This code has been refactored to reduce repetition. Its efficiency now ** depends on the C compiler inlining some quite large functions and then ** doing constant folding to effectively produce a specialised version of -** the main function +** the main function. This is why several functions below have been +** marked with 'ALWAYS_INLINE'. */ -/* TL: UInt CacheIndex; */ - -/* This avoids a function call in the case of external objects with a - stored type */ - -static inline Obj TYPE_OBJ_FEO ( - Obj obj - ) +// Helper function to quickly get the type of an object, avoiding +// indirection in the case of external objects with a stored type I.e., +// the compiler can inline TYPE_COMOBJ etc., while it cannot inline +// TYPE_OBJ +static inline Obj TYPE_OBJ_FEO(Obj obj) { #ifdef HPCGAP /* TODO: We need to be able to automatically derive this. */ @@ -1933,14 +1928,16 @@ static inline Obj CacheOper(Obj oper, UInt i) #endif -/* This function actually searches the cache. Normally it should be called - with n a compile-time constant to allow the optimiser to tidy things up */ - #ifdef COUNT_OPERS static UInt CacheHitStatistics[CACHE_SIZE][CACHE_SIZE][7]; static UInt CacheMissStatistics[CACHE_SIZE + 1][7]; #endif + +// This function actually searches the cache. Normally it should be +// called with n a compile-time constant to allow the optimiser to tidy +// things up. +// It is also marked with 'ALWAYS_INLINE' for this reason (see above). static ALWAYS_INLINE Obj GetMethodCached(Obj oper, UInt n, Int prec, @@ -2018,88 +2015,119 @@ CacheMethod(Obj oper, UInt n, Int prec, Obj * ids, Obj method) CHANGED_BAG(cacheBag); } -/* These will contain the GAP method selection functions */ -static Obj MethodSelectors[2][7]; -static Obj VerboseMethodSelectors[2][7]; +static Obj ReturnTrue; +static Obj VMETHOD_PRINT_INFO; +static Obj NEXT_VMETHOD_PRINT_INFO; + +// This function searches through the methods of operation with +// arity , looking for those matching the given . Among these, +// the -th is selected ( starts at 0). +// +// If is non-zero, the matching method are printed by calling +// 'VMETHOD_PRINT_INFO' resp. 'NEXT_VMETHOD_PRINT_INFO'. +// +// If is non-zero, then is a constructor, leading +// to being treated differently. +// +// Use of 'ALWAYS_INLINE' is critical for performance, see discussion +// earlier in this file. +static ALWAYS_INLINE Obj GetMethodUncached( + UInt verbose, UInt constructor, UInt n, Obj oper, Int prec, Obj types[]) +{ + Obj methods = METHS_OPER(oper, n); + if (methods == 0) + return Fail; + + const UInt len = LEN_PLIST(methods); + UInt j = 0; + for (UInt pos = 0; pos < len; pos += n + 4) { + // each method comprises n+4 entries in the 'methods' list: + // entry 1 is the family predicated; + // entries 2 till n+1 are the n argument filters + // entry n+2 is the actual method + // entry n+3 is the rank + // entry n+4 is the info text + + // check argument filters against the given types + Obj filter; + int k = 1; + if (constructor) { + filter = ELM_PLIST(methods, pos + k + 1); + GAP_ASSERT(TNUM_OBJ(filter) == T_FLAGS); + if (!IS_SUBSET_FLAGS(filter, types[0])) + continue; + k++; + } + for (; k <= n; ++k) { + filter = ELM_PLIST(methods, pos + k + 1); + GAP_ASSERT(TNUM_OBJ(filter) == T_FLAGS); + if (!IS_SUBSET_FLAGS(FLAGS_TYPE(types[k - 1]), filter)) + break; + } -static ALWAYS_INLINE Obj -GetMethodUncached(UInt n, Obj oper, Int prec, Obj types[], Obj selectors[][7]) -{ - Obj margs; - Obj method = 0; - UInt i; - if (prec == 0) { - switch (n) { - case 0: - method = CALL_1ARGS(selectors[0][0], oper); - break; - case 1: - method = CALL_2ARGS(selectors[0][1], oper, types[0]); - break; - case 2: - method = CALL_3ARGS(selectors[0][2], oper, types[0], types[1]); - break; - case 3: - method = CALL_4ARGS(selectors[0][3], oper, types[0], types[1], - types[2]); - break; - case 4: - method = CALL_5ARGS(selectors[0][4], oper, types[0], types[1], - types[2], types[3]); - break; - case 5: - method = CALL_6ARGS(selectors[0][5], oper, types[0], types[1], - types[2], types[3], types[4]); - break; - case 6: - margs = NEW_PLIST(T_PLIST, n + 1); - SET_ELM_PLIST(margs, 1, oper); - for (i = 0; i < n; i++) - SET_ELM_PLIST(margs, 2 + i, types[i]); - SET_LEN_PLIST(margs, n + 1); - method = CALL_XARGS(selectors[0][6], margs); - break; - default: - GAP_ASSERT(0); + // if some filter did not match, go to next method + if (k <= n) + continue; + + // check family predicate, with a hot path for the very + // common trivial predicate 'ReturnTrue' + Obj fampred = ELM_PLIST(methods, pos + 1); + if (fampred != ReturnTrue) { + Obj res = 0; + switch (n) { + case 0: + res = CALL_0ARGS(fampred); + break; + case 1: + res = CALL_1ARGS(fampred, FAMILY_TYPE(types[0])); + break; + case 2: + res = CALL_2ARGS(fampred, FAMILY_TYPE(types[0]), + FAMILY_TYPE(types[1])); + break; + case 3: + res = + CALL_3ARGS(fampred, FAMILY_TYPE(types[0]), + FAMILY_TYPE(types[1]), FAMILY_TYPE(types[2])); + break; + case 4: + res = CALL_4ARGS(fampred, FAMILY_TYPE(types[0]), + FAMILY_TYPE(types[1]), FAMILY_TYPE(types[2]), + FAMILY_TYPE(types[3])); + break; + case 5: + res = + CALL_5ARGS(fampred, FAMILY_TYPE(types[0]), + FAMILY_TYPE(types[1]), FAMILY_TYPE(types[2]), + FAMILY_TYPE(types[3]), FAMILY_TYPE(types[4])); + break; + case 6: + res = CALL_6ARGS(fampred, FAMILY_TYPE(types[0]), + FAMILY_TYPE(types[1]), FAMILY_TYPE(types[2]), + FAMILY_TYPE(types[3]), FAMILY_TYPE(types[4]), + FAMILY_TYPE(types[5])); + break; + default: + ErrorMayQuit("not supported yet", 0, 0); + } + + if (res != True) + continue; } - } - else { - switch (n) { - case 0: - method = CALL_2ARGS(selectors[1][0], oper, INTOBJ_INT(prec)); - break; - case 1: - method = - CALL_3ARGS(selectors[1][1], oper, INTOBJ_INT(prec), types[0]); - break; - case 2: - method = CALL_4ARGS(selectors[1][2], oper, INTOBJ_INT(prec), - types[0], types[1]); - break; - case 3: - method = CALL_5ARGS(selectors[1][3], oper, INTOBJ_INT(prec), - types[0], types[1], types[2]); - break; - case 4: - method = CALL_6ARGS(selectors[1][4], oper, INTOBJ_INT(prec), - types[0], types[1], types[2], types[3]); - break; - case 5: - case 6: - margs = NEW_PLIST(T_PLIST, n + 2); - SET_ELM_PLIST(margs, 1, oper); - SET_ELM_PLIST(margs, 2, INTOBJ_INT(prec)); - for (i = 0; i < n; i++) - SET_ELM_PLIST(margs, 3 + i, types[i]); - SET_LEN_PLIST(margs, n + 2); - method = CALL_XARGS(selectors[1][n], margs); - break; - default: - GAP_ASSERT(0); + // we have a match; is it the right one? + if (prec == j) { + if (verbose) { + CALL_3ARGS(prec == 0 ? VMETHOD_PRINT_INFO : NEXT_VMETHOD_PRINT_INFO, methods, + INTOBJ_INT(pos / (n + 4) + 1), INTOBJ_INT(n)); + + } + Obj meth = ELM_PLIST(methods, pos + n + 2); + return meth; } + j++; } - return method; + return Fail; } #ifdef COUNT_OPERS @@ -2109,9 +2137,10 @@ static Int OperationNext; #endif +// Use of 'ALWAYS_INLINE' is critical for performance, see discussion +// earlier in this file. static ALWAYS_INLINE Obj DoOperationNArgs(Obj oper, UInt n, - Obj selectors[2][7], UInt verbose, UInt constructor, Obj arg1, @@ -2189,7 +2218,8 @@ static ALWAYS_INLINE Obj DoOperationNArgs(Obj oper, /* otherwise try to find one in the list of methods */ if (!method) { - method = GetMethodUncached(n, oper, prec, types, selectors); + method = GetMethodUncached(verbose, constructor, n, oper, + prec, types); /* update the cache */ if (!verbose && method) CacheMethod(oper, n, prec, ids, method); @@ -2262,44 +2292,44 @@ static ALWAYS_INLINE Obj DoOperationNArgs(Obj oper, Obj DoOperation0Args(Obj oper) { - return DoOperationNArgs(oper, 0, MethodSelectors, 0, 0, 0, 0, 0, 0, 0, 0); + return DoOperationNArgs(oper, 0, 0, 0, 0, 0, 0, 0, 0, 0); } Obj DoOperation1Args(Obj oper, Obj arg1) { - return DoOperationNArgs(oper, 1, MethodSelectors, 0, 0, arg1, 0, 0, 0, 0, + return DoOperationNArgs(oper, 1, 0, 0, arg1, 0, 0, 0, 0, 0); } Obj DoOperation2Args(Obj oper, Obj arg1, Obj arg2) { - return DoOperationNArgs(oper, 2, MethodSelectors, 0, 0, arg1, arg2, 0, 0, + return DoOperationNArgs(oper, 2, 0, 0, arg1, arg2, 0, 0, 0, 0); } Obj DoOperation3Args(Obj oper, Obj arg1, Obj arg2, Obj arg3) { - return DoOperationNArgs(oper, 3, MethodSelectors, 0, 0, arg1, arg2, arg3, + return DoOperationNArgs(oper, 3, 0, 0, arg1, arg2, arg3, 0, 0, 0); } Obj DoOperation4Args(Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4) { - return DoOperationNArgs(oper, 4, MethodSelectors, 0, 0, arg1, arg2, arg3, + return DoOperationNArgs(oper, 4, 0, 0, arg1, arg2, arg3, arg4, 0, 0); } Obj DoOperation5Args( Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4, Obj arg5) { - return DoOperationNArgs(oper, 5, MethodSelectors, 0, 0, arg1, arg2, arg3, + return DoOperationNArgs(oper, 5, 0, 0, arg1, arg2, arg3, arg4, arg5, 0); } Obj DoOperation6Args( Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4, Obj arg5, Obj arg6) { - return DoOperationNArgs(oper, 6, MethodSelectors, 0, 0, arg1, arg2, arg3, + return DoOperationNArgs(oper, 6, 0, 0, arg1, arg2, arg3, arg4, arg5, arg6); } @@ -2322,45 +2352,45 @@ Obj DoOperationXArgs(Obj self, Obj args) */ Obj DoVerboseOperation0Args(Obj oper) { - return DoOperationNArgs(oper, 0, VerboseMethodSelectors, 1, 0, 0, 0, 0, 0, + return DoOperationNArgs(oper, 0, 1, 0, 0, 0, 0, 0, 0, 0); } Obj DoVerboseOperation1Args(Obj oper, Obj arg1) { - return DoOperationNArgs(oper, 1, VerboseMethodSelectors, 1, 0, arg1, 0, 0, + return DoOperationNArgs(oper, 1, 1, 0, arg1, 0, 0, 0, 0, 0); } Obj DoVerboseOperation2Args(Obj oper, Obj arg1, Obj arg2) { - return DoOperationNArgs(oper, 2, VerboseMethodSelectors, 1, 0, arg1, arg2, + return DoOperationNArgs(oper, 2, 1, 0, arg1, arg2, 0, 0, 0, 0); } Obj DoVerboseOperation3Args(Obj oper, Obj arg1, Obj arg2, Obj arg3) { - return DoOperationNArgs(oper, 3, VerboseMethodSelectors, 1, 0, arg1, arg2, + return DoOperationNArgs(oper, 3, 1, 0, arg1, arg2, arg3, 0, 0, 0); } Obj DoVerboseOperation4Args(Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4) { - return DoOperationNArgs(oper, 4, VerboseMethodSelectors, 1, 0, arg1, arg2, + return DoOperationNArgs(oper, 4, 1, 0, arg1, arg2, arg3, arg4, 0, 0); } Obj DoVerboseOperation5Args( Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4, Obj arg5) { - return DoOperationNArgs(oper, 5, VerboseMethodSelectors, 1, 0, arg1, arg2, + return DoOperationNArgs(oper, 5, 1, 0, arg1, arg2, arg3, arg4, arg5, 0); } Obj DoVerboseOperation6Args( Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4, Obj arg5, Obj arg6) { - return DoOperationNArgs(oper, 6, VerboseMethodSelectors, 1, 0, arg1, arg2, + return DoOperationNArgs(oper, 6, 1, 0, arg1, arg2, arg3, arg4, arg5, arg6); } @@ -2416,14 +2446,6 @@ Obj NewOperation(Obj name, Int narg, Obj nams, ObjFunc hdlr) } -/**************************************************************************** - ** - *F DoConstructor( ) . . . . . . . . . . . . . make a new constructor - */ - -Obj ConstructorSelectors[2][7]; -Obj VerboseConstructorSelectors[2][7]; - /**************************************************************************** ** ** DoConstructor0Args( ) @@ -2434,45 +2456,45 @@ Obj VerboseConstructorSelectors[2][7]; Obj DoConstructor0Args(Obj oper) { - return DoOperationNArgs(oper, 0, ConstructorSelectors, 0, 1, 0, 0, 0, 0, + return DoOperationNArgs(oper, 0, 0, 1, 0, 0, 0, 0, 0, 0); } Obj DoConstructor1Args(Obj oper, Obj arg1) { - return DoOperationNArgs(oper, 1, ConstructorSelectors, 0, 1, arg1, 0, 0, + return DoOperationNArgs(oper, 1, 0, 1, arg1, 0, 0, 0, 0, 0); } Obj DoConstructor2Args(Obj oper, Obj arg1, Obj arg2) { - return DoOperationNArgs(oper, 2, ConstructorSelectors, 0, 1, arg1, arg2, + return DoOperationNArgs(oper, 2, 0, 1, arg1, arg2, 0, 0, 0, 0); } Obj DoConstructor3Args(Obj oper, Obj arg1, Obj arg2, Obj arg3) { - return DoOperationNArgs(oper, 3, ConstructorSelectors, 0, 1, arg1, arg2, + return DoOperationNArgs(oper, 3, 0, 1, arg1, arg2, arg3, 0, 0, 0); } Obj DoConstructor4Args(Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4) { - return DoOperationNArgs(oper, 4, ConstructorSelectors, 0, 1, arg1, arg2, + return DoOperationNArgs(oper, 4, 0, 1, arg1, arg2, arg3, arg4, 0, 0); } Obj DoConstructor5Args( Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4, Obj arg5) { - return DoOperationNArgs(oper, 5, ConstructorSelectors, 0, 1, arg1, arg2, + return DoOperationNArgs(oper, 5, 0, 1, arg1, arg2, arg3, arg4, arg5, 0); } Obj DoConstructor6Args( Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4, Obj arg5, Obj arg6) { - return DoOperationNArgs(oper, 6, ConstructorSelectors, 0, 1, arg1, arg2, + return DoOperationNArgs(oper, 6, 0, 1, arg1, arg2, arg3, arg4, arg5, arg6); } @@ -2494,46 +2516,46 @@ Obj DoConstructorXArgs(Obj self, Obj args) Obj DoVerboseConstructor0Args(Obj oper) { - return DoOperationNArgs(oper, 0, VerboseConstructorSelectors, 1, 1, 0, 0, + return DoOperationNArgs(oper, 0, 1, 1, 0, 0, 0, 0, 0, 0); } Obj DoVerboseConstructor1Args(Obj oper, Obj arg1) { - return DoOperationNArgs(oper, 1, VerboseConstructorSelectors, 1, 1, arg1, + return DoOperationNArgs(oper, 1, 1, 1, arg1, 0, 0, 0, 0, 0); } Obj DoVerboseConstructor2Args(Obj oper, Obj arg1, Obj arg2) { - return DoOperationNArgs(oper, 2, VerboseConstructorSelectors, 1, 1, arg1, + return DoOperationNArgs(oper, 2, 1, 1, arg1, arg2, 0, 0, 0, 0); } Obj DoVerboseConstructor3Args(Obj oper, Obj arg1, Obj arg2, Obj arg3) { - return DoOperationNArgs(oper, 3, VerboseConstructorSelectors, 1, 1, arg1, + return DoOperationNArgs(oper, 3, 1, 1, arg1, arg2, arg3, 0, 0, 0); } Obj DoVerboseConstructor4Args( Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4) { - return DoOperationNArgs(oper, 4, VerboseConstructorSelectors, 1, 1, arg1, + return DoOperationNArgs(oper, 4, 1, 1, arg1, arg2, arg3, arg4, 0, 0); } Obj DoVerboseConstructor5Args( Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4, Obj arg5) { - return DoOperationNArgs(oper, 5, VerboseConstructorSelectors, 1, 1, arg1, + return DoOperationNArgs(oper, 5, 1, 1, arg1, arg2, arg3, arg4, arg5, 0); } Obj DoVerboseConstructor6Args( Obj oper, Obj arg1, Obj arg2, Obj arg3, Obj arg4, Obj arg5, Obj arg6) { - return DoOperationNArgs(oper, 6, VerboseConstructorSelectors, 1, 1, arg1, + return DoOperationNArgs(oper, 6, 1, 1, arg1, arg2, arg3, arg4, arg5, arg6); } @@ -4210,72 +4232,10 @@ static Int InitKernel ( /* install the (function) copies of global variables */ /*for the inside-out (kernel to library) interface */ InitGlobalBag( &TRY_NEXT_METHOD, "src/opers.c:TRY_NEXT_METHOD" ); - - ImportFuncFromLibrary( "METHOD_0ARGS", &(MethodSelectors[0][0]) ); - ImportFuncFromLibrary( "METHOD_1ARGS", &(MethodSelectors[0][1]) ); - ImportFuncFromLibrary( "METHOD_2ARGS", &(MethodSelectors[0][2]) ); - ImportFuncFromLibrary( "METHOD_3ARGS", &(MethodSelectors[0][3]) ); - ImportFuncFromLibrary( "METHOD_4ARGS", &(MethodSelectors[0][4]) ); - ImportFuncFromLibrary( "METHOD_5ARGS", &(MethodSelectors[0][5]) ); - ImportFuncFromLibrary( "METHOD_6ARGS", &(MethodSelectors[0][6]) ); - - ImportFuncFromLibrary( "NEXT_METHOD_0ARGS", &(MethodSelectors[1][0]) ); - ImportFuncFromLibrary( "NEXT_METHOD_1ARGS", &(MethodSelectors[1][1]) ); - ImportFuncFromLibrary( "NEXT_METHOD_2ARGS", &(MethodSelectors[1][2]) ); - ImportFuncFromLibrary( "NEXT_METHOD_3ARGS", &(MethodSelectors[1][3]) ); - ImportFuncFromLibrary( "NEXT_METHOD_4ARGS", &(MethodSelectors[1][4]) ); - ImportFuncFromLibrary( "NEXT_METHOD_5ARGS", &(MethodSelectors[1][5]) ); - ImportFuncFromLibrary( "NEXT_METHOD_6ARGS", &(MethodSelectors[1][6]) ); - - ImportFuncFromLibrary( "VMETHOD_0ARGS", &(VerboseMethodSelectors[0][0]) ); - ImportFuncFromLibrary( "VMETHOD_1ARGS", &(VerboseMethodSelectors[0][1]) ); - ImportFuncFromLibrary( "VMETHOD_2ARGS", &(VerboseMethodSelectors[0][2]) ); - ImportFuncFromLibrary( "VMETHOD_3ARGS", &(VerboseMethodSelectors[0][3]) ); - ImportFuncFromLibrary( "VMETHOD_4ARGS", &(VerboseMethodSelectors[0][4]) ); - ImportFuncFromLibrary( "VMETHOD_5ARGS", &(VerboseMethodSelectors[0][5]) ); - ImportFuncFromLibrary( "VMETHOD_6ARGS", &(VerboseMethodSelectors[0][6]) ); - - ImportFuncFromLibrary( "NEXT_VMETHOD_0ARGS", &(VerboseMethodSelectors[1][0]) ); - ImportFuncFromLibrary( "NEXT_VMETHOD_1ARGS", &(VerboseMethodSelectors[1][1]) ); - ImportFuncFromLibrary( "NEXT_VMETHOD_2ARGS", &(VerboseMethodSelectors[1][2]) ); - ImportFuncFromLibrary( "NEXT_VMETHOD_3ARGS", &(VerboseMethodSelectors[1][3]) ); - ImportFuncFromLibrary( "NEXT_VMETHOD_4ARGS", &(VerboseMethodSelectors[1][4]) ); - ImportFuncFromLibrary( "NEXT_VMETHOD_5ARGS", &(VerboseMethodSelectors[1][5]) ); - ImportFuncFromLibrary( "NEXT_VMETHOD_6ARGS", &(VerboseMethodSelectors[1][6]) ); - - - ImportFuncFromLibrary( "CONSTRUCTOR_0ARGS", &(ConstructorSelectors[0][0]) ); - ImportFuncFromLibrary( "CONSTRUCTOR_1ARGS", &(ConstructorSelectors[0][1]) ); - ImportFuncFromLibrary( "CONSTRUCTOR_2ARGS", &(ConstructorSelectors[0][2]) ); - ImportFuncFromLibrary( "CONSTRUCTOR_3ARGS", &(ConstructorSelectors[0][3]) ); - ImportFuncFromLibrary( "CONSTRUCTOR_4ARGS", &(ConstructorSelectors[0][4]) ); - ImportFuncFromLibrary( "CONSTRUCTOR_5ARGS", &(ConstructorSelectors[0][5]) ); - ImportFuncFromLibrary( "CONSTRUCTOR_6ARGS", &(ConstructorSelectors[0][6]) ); - - ImportFuncFromLibrary( "NEXT_CONSTRUCTOR_0ARGS", &(ConstructorSelectors[1][0]) ); - ImportFuncFromLibrary( "NEXT_CONSTRUCTOR_1ARGS", &(ConstructorSelectors[1][1]) ); - ImportFuncFromLibrary( "NEXT_CONSTRUCTOR_2ARGS", &(ConstructorSelectors[1][2]) ); - ImportFuncFromLibrary( "NEXT_CONSTRUCTOR_3ARGS", &(ConstructorSelectors[1][3]) ); - ImportFuncFromLibrary( "NEXT_CONSTRUCTOR_4ARGS", &(ConstructorSelectors[1][4]) ); - ImportFuncFromLibrary( "NEXT_CONSTRUCTOR_5ARGS", &(ConstructorSelectors[1][5]) ); - ImportFuncFromLibrary( "NEXT_CONSTRUCTOR_6ARGS", &(ConstructorSelectors[1][6]) ); - - ImportFuncFromLibrary( "VCONSTRUCTOR_0ARGS", &(VerboseConstructorSelectors[0][0]) ); - ImportFuncFromLibrary( "VCONSTRUCTOR_1ARGS", &(VerboseConstructorSelectors[0][1]) ); - ImportFuncFromLibrary( "VCONSTRUCTOR_2ARGS", &(VerboseConstructorSelectors[0][2]) ); - ImportFuncFromLibrary( "VCONSTRUCTOR_3ARGS", &(VerboseConstructorSelectors[0][3]) ); - ImportFuncFromLibrary( "VCONSTRUCTOR_4ARGS", &(VerboseConstructorSelectors[0][4]) ); - ImportFuncFromLibrary( "VCONSTRUCTOR_5ARGS", &(VerboseConstructorSelectors[0][5]) ); - ImportFuncFromLibrary( "VCONSTRUCTOR_6ARGS", &(VerboseConstructorSelectors[0][6]) ); - - ImportFuncFromLibrary( "NEXT_VCONSTRUCTOR_0ARGS", &(VerboseConstructorSelectors[1][0]) ); - ImportFuncFromLibrary( "NEXT_VCONSTRUCTOR_1ARGS", &(VerboseConstructorSelectors[1][1]) ); - ImportFuncFromLibrary( "NEXT_VCONSTRUCTOR_2ARGS", &(VerboseConstructorSelectors[1][2]) ); - ImportFuncFromLibrary( "NEXT_VCONSTRUCTOR_3ARGS", &(VerboseConstructorSelectors[1][3]) ); - ImportFuncFromLibrary( "NEXT_VCONSTRUCTOR_4ARGS", &(VerboseConstructorSelectors[1][4]) ); - ImportFuncFromLibrary( "NEXT_VCONSTRUCTOR_5ARGS", &(VerboseConstructorSelectors[1][5]) ); - ImportFuncFromLibrary( "NEXT_VCONSTRUCTOR_6ARGS", &(VerboseConstructorSelectors[1][6]) ); + ImportFuncFromLibrary("ReturnTrue", &ReturnTrue); + ImportFuncFromLibrary("VMETHOD_PRINT_INFO", &VMETHOD_PRINT_INFO); + ImportFuncFromLibrary("NEXT_VMETHOD_PRINT_INFO", &NEXT_VMETHOD_PRINT_INFO); ImportFuncFromLibrary( "SET_FILTER_OBJ", &SET_FILTER_OBJ ); ImportFuncFromLibrary( "RESET_FILTER_OBJ", &RESET_FILTER_OBJ ); @@ -4308,6 +4268,7 @@ static Int InitKernel ( /* import copy of REREADING */ ImportGVarFromLibrary( "REREADING", &REREADING ); + #ifdef HPCGAP /* initialize cache mutex */ pthread_mutex_init(&CacheLock, NULL); diff --git a/tst/testinstall/kernel/opers.tst b/tst/testinstall/kernel/opers.tst index 8b4737609a..449eb4e819 100644 --- a/tst/testinstall/kernel/opers.tst +++ b/tst/testinstall/kernel/opers.tst @@ -301,13 +301,46 @@ gap> TraceMethods( [ Size ] ); gap> Size(g); #I Size: system getter 6 +gap> UntraceMethods( [ Size ] ); + +# temporarily override (NEXT_)VMETHOD_PRINT_INFO to avoid system +# specific paths in the output +gap> MakeReadWriteGlobal("VMETHOD_PRINT_INFO"); +gap> MakeReadWriteGlobal("NEXT_VMETHOD_PRINT_INFO"); +gap> old1:=VMETHOD_PRINT_INFO;; +gap> old2:=NEXT_VMETHOD_PRINT_INFO;; +gap> VMETHOD_PRINT_INFO := function(methods, i, arity) +> Print("#I ", methods[(arity+4)*i], "\n"); +> end;; +gap> NEXT_VMETHOD_PRINT_INFO := function(methods, i, arity) +> Print("#I Trying next: ", methods[(arity+4)*i], "\n"); +> end;; + +# +gap> TraceMethods( [ IsCyclic ] ); +gap> g:= Group( (1,2,3), (1,2) );; +gap> IsCyclic(g); +#I IsCyclic +#I Trying next: IsCyclic: generic method for groups +false +gap> g:= Group( (1,2,3), (1,3,2) );; +gap> IsCyclic(g); +#I IsCyclic +#I Trying next: IsCyclic: generic method for groups +true + +# restore PRINT_INFO functions +gap> VMETHOD_PRINT_INFO:=old1;; +gap> NEXT_VMETHOD_PRINT_INFO:=old2;; +gap> MakeReadOnlyGlobal("VMETHOD_PRINT_INFO"); +gap> MakeReadOnlyGlobal("NEXT_VMETHOD_PRINT_INFO"); # gap> UntraceMethods(); Error, `UntraceMethods' require at least one argument gap> UntraceMethods([ 1 ]); Error, must be an operation -gap> UntraceMethods( [ Size ] ); +gap> UntraceMethods( [ IsCyclic ] ); # gap> STOP_TEST("kernel/opers.tst", 1); diff --git a/tst/testinstall/opers/LocationFunc.tst b/tst/testinstall/opers/LocationFunc.tst index 8cbe53a56f..ff7af4eb8f 100644 --- a/tst/testinstall/opers/LocationFunc.tst +++ b/tst/testinstall/opers/LocationFunc.tst @@ -6,8 +6,8 @@ gap> LocationFunc(f); "stream:1" # GAP function which was compiled to C code by gac -gap> LocationFunc(METHOD_0ARGS); -"GAPROOT/lib/methsel1.g:19" +gap> LocationFunc(RunImmediateMethods); +"GAPROOT/lib/oper1.g:26" # proper kernel function gap> LocationFunc(APPEND_LIST_INTR); diff --git a/tst/testinstall/varargs.tst b/tst/testinstall/varargs.tst index 150f0ba4d6..7df0495433 100644 --- a/tst/testinstall/varargs.tst +++ b/tst/testinstall/varargs.tst @@ -81,13 +81,13 @@ gap> Display(RETURN_FIRST); function ( object... ) <> end -gap> Print(NEXT_METHOD_0ARGS,"\n"); +gap> Print(RunImmediateMethods,"\n"); function ( <>, <> ) - <> + <> end -gap> Display(METHOD_XARGS); +gap> Display(InstallMethod); function ( <>... ) - <> + <> end gap> [1..2]; [ 1, 2 ]