MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / link_assembled_objects

Method link_assembled_objects

src/compilation_pipeline.rs:990–1006  ·  view source on GitHub ↗
(
        &self,
        modules: &[(&str, &AssembledOutput)],
    )

Source from the content-addressed store, hash-verified

988 let (asm, tokens) = compiler.compile_with_tokens(ir);
989 let stem = if let Some(existing) = self.current_artifact_stem() {
990 existing
991 } else {
992 let stem = self.default_artifact_stem(Location::caller(), "asm", &asm);
993 *self.last_artifact_stem.borrow_mut() = Some(stem.clone());
994 stem
995 };
996 self.write_text_artifact("asm", &stem, ".s", &asm);
997 (asm, tokens)
998 }
999
1000 /// Assemble a token stream into machine code.
1001 #[track_caller]
1002 pub fn assemble(&self, tokens: &[RvInstruction]) -> Result<AssembledOutput, AssemblerError> {
1003 let stem = self.current_artifact_stem().unwrap_or_else(|| {
1004 self.default_artifact_stem(Location::caller(), "obj", &format!("{}", tokens.len()))
1005 });
1006 self.assemble_named(&stem, tokens)
1007 }
1008
1009 #[track_caller]

Callers 15

kernel_asm_diagFunction · 0.80
link_stdlib_and_runFunction · 0.80
run_hll_with_limitFunction · 0.80
run_irFunction · 0.80
run_hll_peepholeFunction · 0.80
run_hll_omit_fpFunction · 0.80
run_hll_optimizeFunction · 0.80
run_hllFunction · 0.80

Calls 3

current_artifact_stemMethod · 0.80
default_artifact_stemMethod · 0.80