MCPcopy Index your code
hub / github.com/endbasic/endbasic / deref_string

Method deref_string

core/src/vm/context.rs:272–280  ·  view source on GitHub ↗

Dereferences a pointer register as a string.

(
        &self,
        reg: Register,
        constants: &'b [ConstantDatum],
        heap: &'b Heap,
    )

Source from the content-addressed store, hash-verified

270
271 /// Dereferences a pointer register as a string.
272 fn deref_string<'b>(
273 &self,
274 reg: Register,
275 constants: &'b [ConstantDatum],
276 heap: &'b Heap,
277 ) -> &'b str {
278 let raw_addr = self.get_reg(reg);
279 DatumPtr::from(raw_addr).resolve_string(constants, heap)
280 }
281
282 /// Returns the raw `u64` value stored in global register `index`.
283 ///

Callers 2

do_binary_text_opMethod · 0.45
do_concatMethod · 0.45

Calls 2

get_regMethod · 0.80
resolve_stringMethod · 0.80

Tested by

no test coverage detected