MCPcopy Create free account
hub / github.com/IntegralPilot/rustc_codegen_jvm / to_string

Method to_string

src/oomir.rs:296–318  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

294 pub signature: Signature,
295 pub debug_variables: Vec<DebugVariable>,
296 pub body: CodeBlock,
297}
298
299#[derive(Debug, Clone, PartialEq, Eq, Hash)]
300pub struct Signature {
301 pub params: Vec<(String, Type)>,
302 pub ret: Box<Type>,
303 pub is_static: bool,
304}
305
306impl Signature {
307 /// Whether the first OOMIR parameter is represented by the JVM's implicit
308 /// receiver slot rather than appearing in the method descriptor.
309 pub fn has_implicit_jvm_receiver(&self) -> bool {
310 !self.is_static
311 && self
312 .params
313 .first()
314 .is_some_and(|(_, ty)| ty.is_jvm_reference_type())
315 }
316
317 pub fn explicit_jvm_params(&self) -> &[(String, Type)] {
318 if self.has_implicit_jvm_receiver() {
319 &self.params[1..]
320 } else {
321 &self.params

Callers 15

oomir_to_jvm_bytecodeFunction · 0.80
to_jvm_descriptorMethod · 0.80
to_jvm_internal_nameMethod · 0.80
from_constantMethod · 0.80
replace_classMethod · 0.80
codegen_crateMethod · 0.80
mir_to_oomirFunction · 0.80

Calls 1

to_jvm_descriptorMethod · 0.80

Tested by

no test coverage detected