@Requires({
    "kind != null",
    "kind.isOld()",
    "list != null"
  })
  protected void allocateOldValues(ContractKind kind, List<Integer> list) {
    List<MethodContractHandle> olds =
        contracts.getMethodHandles(kind, methodName, methodDesc, 0);
    if (olds.isEmpty()) {
      return;
    }

    Integer[] locals = new Integer[olds.size()];
    for (MethodContractHandle h : olds) {
      int k = h.getKey();
      locals[k] = newLocal(Type.getReturnType(h.getContractMethod().desc));
      push((String) null);
      storeLocal(locals[k]);
    }
    list.addAll(Arrays.asList(locals));
  }
@ Requires ( { "kind != null" , "kind.isOld()" , "list != null" } ) protected void allocateOldValues ( ContractKind kind , List < Integer > list ) { List < MethodContractHandle > olds = contracts . getMethodHandles ( kind , methodName , methodDesc , 0 ) ; if ( olds . isEmpty ( ) ) { return ; } Integer [ ] locals = new Integer [ olds . size ( ) ] ; for ( MethodContractHandle h : olds ) { int k = h . getKey ( ) ; locals [ k ] = newLocal ( Type . getReturnType ( h . getContractMethod ( ) . desc ) ) ; push ( ( String ) null ) ; storeLocal ( locals [ k ] ) ; } list . addAll ( Arrays . asList ( locals ) ) ; }
Injects code to allocate the local variables needed to hold old
values for the postconditions of the method. These variables are
initialized to {@code null}.

@param kind either OLD or SIGNAL_OLD
@param list the list that will hold the allocated indexes