Skip to content

Commit

Permalink
remove un-necessary para
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiTheModder committed Nov 8, 2024
1 parent 1044add commit 367ba05
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/routes/instructions/invoke-custom.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -252,37 +252,6 @@
<code>MethodHandle</code>. Read more about it
<a href="/instructions/invoke-polymorphic">here</a>
</p>
<h2 id="lambdas-and-invoke-custom">
Lambdas and <strong><code>invoke-custom</code></strong>
</h2>
<p>
In Java bytecode, lambda expressions usually get implemented through
something called the <strong><code>LambdaMetafactory</code></strong>,
which can create a functional interface at runtime.
</p>
<p>
In Android’s Dalvik bytecode, even though <code>invoke-custom</code> can
support dynamic calls similar to Java’s <code>invokedynamic</code>,
standard lambdas don’t typically get compiled into
<code>invoke-custom</code>. Instead, they are often translated into
<strong>anonymous inner classes</strong>(like if you do in an android
project they get converted to synthetic subclasses)
<strong>or something similar in the DEX files</strong>.
</p>
<h2 id="when-invoke-custom-is-actually-used">
When <code>invoke-custom</code> is Actually Used
</h2>
<p><code>invoke-custom</code> is intended for scenarios that need:</p>
<ol>
<li>
<strong>Dynamic method resolution</strong> through a
<strong>call site</strong>.
</li>
<li>
<strong>Special handling</strong> by a bootstrap method that isn’t just simple
functional interface invocation.
</li>
</ol>

<h3 id="references">References</h3>
<ul>
Expand Down

0 comments on commit 367ba05

Please sign in to comment.