MCPcopy Index your code
hub / github.com/tinygo-org/tinygo / createVolatileStore

Method createVolatileStore

compiler/volatile.go:22–30  ·  view source on GitHub ↗

createVolatileStore is the implementation of the intrinsic function runtime/volatile.StoreT().

()

Source from the content-addressed store, hash-verified

20// createVolatileStore is the implementation of the intrinsic function
21// runtime/volatile.StoreT().
22func (b *builder) createVolatileStore() {
23 b.createFunctionStart(true)
24 addr := b.getValue(b.fn.Params[0], getPos(b.fn))
25 val := b.getValue(b.fn.Params[1], getPos(b.fn))
26 b.createNilCheck(b.fn.Params[0], addr, "deref")
27 store := b.CreateStore(val, addr)
28 store.SetVolatile(true)
29 b.CreateRetVoid()
30}

Callers 1

Calls 4

createFunctionStartMethod · 0.95
getValueMethod · 0.95
createNilCheckMethod · 0.95
getPosFunction · 0.70

Tested by

no test coverage detected