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

Method add

src/lower2/constant_pool.rs:140–148  ·  view source on GitHub ↗
(&mut self, constant: Constant)

Source from the content-addressed store, hash-verified

138 self.pool
139 }
140
141 pub(super) fn add(&mut self, constant: Constant<'static>) -> jvm::Result<u16> {
142 let key = ConstantKey::from(&constant);
143 if let Some(index) = self.constants.get(&key) {
144 return Ok(*index);
145 }
146 let index = self.pool.add(constant)?;
147 self.constants.insert(key, index);
148 Ok(index)
149 }
150
151 pub(super) fn add_utf8<S: AsRef<str>>(&mut self, value: S) -> jvm::Result<u16> {

Callers 15

instanceFieldsMethod · 0.80
add_utf8Method · 0.80
add_integerMethod · 0.80
add_floatMethod · 0.80
add_longMethod · 0.80
add_doubleMethod · 0.80
add_classMethod · 0.80
add_stringMethod · 0.80
add_field_refMethod · 0.80
add_method_refMethod · 0.80
add_name_and_typeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected