MCPcopy Index your code
hub / github.com/RustPython/RustPython / arg_constant

Method arg_constant

crates/codegen/src/compile.rs:9442–9445  ·  view source on GitHub ↗
(&mut self, constant: ConstantData)

Source from the content-addressed store, hash-verified

9440 }
9441
9442 fn arg_constant(&mut self, constant: ConstantData) -> oparg::ConstIdx {
9443 let info = self.current_code_info();
9444 info.metadata.consts.insert_full(constant).0.to_u32().into()
9445 }
9446
9447 /// Try to fold a collection of constant expressions into a single ConstantData::Tuple.
9448 /// Returns None if any element cannot be folded.

Callers 2

compile_function_bodyMethod · 0.80
emit_load_constMethod · 0.80

Calls 2

current_code_infoMethod · 0.80
to_u32Method · 0.45

Tested by

no test coverage detected