[Nice-commit] Nice/src/gnu/expr PrimProcedure.java,1.6,1.7
Brought to you by:
bonniot
From: <bo...@us...> - 2003-06-17 12:06:05
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1:/tmp/cvs-serv23400/src/gnu/expr Modified Files: PrimProcedure.java Log Message: Moved to nice.tools.code.Gen Index: PrimProcedure.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/PrimProcedure.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PrimProcedure.java 27 Nov 2002 17:56:08 -0000 1.6 --- PrimProcedure.java 17 Jun 2003 12:06:02 -0000 1.7 *************** *** 412,440 **** } - /** Creates a LambdaExp that applies this PrimProcedure - * to the appropriate number and type of arguments. - * - * This is usefull to generate an Expression from a given PrimProcedure. - */ - public LambdaExp wrapInLambda() - { - int numArgs = minArgs(); - - LambdaExp lambda = new LambdaExp(); - lambda.min_args = lambda.max_args = numArgs; - - Expression[] args = new Expression[numArgs]; - for (int i = 0; i<numArgs; i++) - { - Declaration decl = lambda.addDeclaration("param__"+i, - getParameterType(i)); - - args[i] = new ReferenceExp(decl); - } - - lambda.body = new ApplyExp(this, args); - return lambda; - } - public Type getParameterType(int index) { --- 412,415 ---- |