protected void allocateArgumentRegisters ( Functor expression ) { // Assign argument registers to functors appearing directly in the argument of the outermost functor. // Variables are never assigned directly to argument registers. int reg = 0 ; for ( ; reg < expression . getArity ( ) ; reg ++ ) { Term term = expression . getArgument ( reg ) ; if ( term instanceof Functor ) { /*log.fine("X" + lastAllocatedTempReg + " = " + interner.getFunctorFunctorName((Functor) term));*/ int allocation = ( reg & 0xff ) | ( REG_ADDR << 8 ) ; symbolTable . put ( term . getSymbolKey ( ) , SymbolTableKeys . SYMKEY_ALLOCATION , allocation ) ; } } }
For a predicate of arity n the first n registers are used to receive its arguments in .