コード例 #1
0
 @NotNull
 @Override
 public StackValue outerValue(
     @NotNull EnclosedValueDescriptor d, @NotNull ExpressionCodegen codegen) {
   CallableDescriptor descriptor = (CallableDescriptor) d.getDescriptor();
   return StackValue.local(descriptor.getExpectedThisObject() != null ? 1 : 0, d.getType());
 }
コード例 #2
0
ファイル: CallBuilder.java プロジェクト: sapal/kotlin
 @NotNull
 private CallTranslator finish() {
   if (resolvedCall == null) {
     assert descriptor != null;
     resolvedCall =
         ResolvedCallImpl.create(
             ResolutionCandidate.create(
                 descriptor,
                 DescriptorUtils.safeGetValue(descriptor.getExpectedThisObject()),
                 DescriptorUtils.safeGetValue(descriptor.getReceiverParameter()),
                 ExplicitReceiverKind.THIS_OBJECT,
                 false),
             TemporaryBindingTrace.create(
                 new BindingTraceContext(), "trace to resolve call (in js)"));
   }
   if (descriptor == null) {
     descriptor = resolvedCall.getCandidateDescriptor().getOriginal();
   }
   assert resolvedCall != null;
   return new CallTranslator(receiver, callee, args, resolvedCall, descriptor, callType, context);
 }