angr.go.codegen_builtins

Rendering of Go builtins and operator-like statements that the runtime rewriter encodes as AIL Call expressions.

A rewritten call has a plain-string target and may carry a go_render tag that selects one of the operator forms below (the argument layout is fixed per kind). Calls without the tag render as name(args) by the regular call printer, which also prints the go_type_args tag (a list of Go type strings) before the arguments, so Call("make", [n], go_type_args=["chan int"]) renders as make(chan int, n).

go_render kinds:

  • "index": [m, k] -> m[k] (also for the tuple-valued v, ok = m[k] form; the destination is the assignment’s left-hand side)

  • "assign": [m, k, v] -> m[k] = v

  • "send": [c, v] -> c <- v

  • "recv": [c] -> <-c

  • "go": [f, args...] -> go f(args...)

  • "defer": [f, args...] -> defer f(args...)

  • "concat": [a, b] -> a + b (string concatenation)

  • "closure": [f, captures...] -> f{X0: a, X1: b} (the closure record of f; the field names come from the go_capture_names tag), or just f without captures

angr.go.codegen_builtins.render_builtin_call(call)

Chunks for a codegen call node carrying a go_render tag, or None when the node is a regular call.

Return type:

Iterator[tuple[str, object]] | None