dex++ 0.3.1
C++ and C API reference
Loading...
Searching...
No Matches
dex::model::CallSite Struct Reference

An invoke-custom call site: the bootstrap method and the arguments it is linked with. More...

#include <model/types.hpp>

Public Member Functions

bool operator== (const CallSite &) const =default
 

Public Attributes

MethodHandle bootstrap
 The bootstrap method (an InvokeStatic handle).
 
std::string method_name
 The name the call site is linked for.
 
std::string method_type
 Its prototype descriptor.
 
std::vector< Value > extra_args
 Further static arguments to the bootstrap method.
 
uint32_t share_key = 0
 

Detailed Description

An invoke-custom call site: the bootstrap method and the arguments it is linked with.

The runtime links each call site once. So two invoke-custom instructions that share a call site share the linked result, and splitting or merging call sites changes how often the bootstrap method runs. share_key keeps that sharing: call sites with the same non-zero key and the same contents are written as one call site; a key of 0 is never shared. read() sets the key from the call site's position in the file, so a read and a write keep the sharing; new code can leave it at 0.

Member Function Documentation

◆ operator==()

bool dex::model::CallSite::operator== ( const CallSite &  ) const
default

Member Data Documentation

◆ bootstrap

MethodHandle dex::model::CallSite::bootstrap

The bootstrap method (an InvokeStatic handle).

◆ method_name

std::string dex::model::CallSite::method_name

The name the call site is linked for.

◆ method_type

std::string dex::model::CallSite::method_type

Its prototype descriptor.

◆ extra_args

std::vector<Value> dex::model::CallSite::extra_args

Further static arguments to the bootstrap method.

◆ share_key

uint32_t dex::model::CallSite::share_key = 0

The documentation for this struct was generated from the following file: