Tagged articles
3 articles
Page 1 of 1
JD Cloud Developers
JD Cloud Developers
Aug 8, 2023 · Fundamentals

How Does the JVM Choose the Right Method? Inside Stack Frames and Dynamic Dispatch

This article explains how Java’s JVM uses stack frames, local variable tables, operand stacks, dynamic linking, and method return addresses to manage method calls, detailing the distinction between static and dynamic dispatch, the role of non‑virtual methods, and how the invokevirtual instruction resolves the correct implementation at runtime.

Dynamic DispatchJVMMethod Dispatch
0 likes · 15 min read
How Does the JVM Choose the Right Method? Inside Stack Frames and Dynamic Dispatch
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Jun 5, 2023 · Fundamentals

Understanding Swift SIL and Method Dispatch Mechanisms

Swift inserts the high‑level SIL intermediate representation between source code and LLVM, exposing type declarations, method blocks, and virtual tables, while supporting three dispatch strategies—direct for value types and final methods, VTable for regular class methods, and Objective‑C message dispatch for @objc dynamic methods—crucial for debugging mixed Swift/Objective‑C and protocol‑extension behavior.

LLVMMethod DispatchSIL
0 likes · 20 min read
Understanding Swift SIL and Method Dispatch Mechanisms
Sohu Tech Products
Sohu Tech Products
Jul 17, 2019 · Mobile Development

Understanding Swift Object Creation, Method Dispatch, and Memory Layout – A C‑Style Pseudocode Exploration

This article explains how Swift objects are created and destroyed, how method calls are implemented compared with Objective‑C, the memory layout of Swift classes, the role of virtual tables, the impact of compiler optimizations, and the feasibility of runtime method replacement, illustrated with extensive C‑style pseudocode examples.

Compiler OptimizationMethod DispatchRuntime
0 likes · 34 min read
Understanding Swift Object Creation, Method Dispatch, and Memory Layout – A C‑Style Pseudocode Exploration