Beispiel #1
0
 @Override
 public void putCapturedValueOnStack(
     @NotNull StackValue stackValue, @NotNull Type valueType, int paramIndex) {
   if (shouldPutValue(stackValue.type, stackValue, null)) {
     stackValue.put(stackValue.type, codegen.v);
   }
   putCapturedInLocal(stackValue.type, stackValue, null, paramIndex);
 }
Beispiel #2
0
 @Override
 public void putValueIfNeeded(
     @Nullable ValueParameterDescriptor valueParameterDescriptor,
     @NotNull Type parameterType,
     @NotNull StackValue value) {
   if (shouldPutValue(parameterType, value, valueParameterDescriptor)) {
     value.put(parameterType, codegen.v);
   }
   afterParameterPut(parameterType, value, valueParameterDescriptor);
 }
Beispiel #3
0
  private void putParameterOnStack(ParameterInfo... infos) {
    int[] index = new int[infos.length];
    for (int i = 0; i < infos.length; i++) {
      ParameterInfo info = infos[i];
      if (!info.isSkippedOrRemapped()) {
        index[i] = codegen.getFrameMap().enterTemp(info.getType());
      } else {
        index[i] = -1;
      }
    }

    for (int i = infos.length - 1; i >= 0; i--) {
      ParameterInfo info = infos[i];
      if (!info.isSkippedOrRemapped()) {
        Type type = info.type;
        StackValue.local(index[i], type).store(StackValue.onStack(type), codegen.v);
      }
    }
  }