angr.go.optimization_passes.runtime_rewriter¶
Turn calls into the Go runtime for maps, channels, goroutines, defer and panic/recover back into the Go statements
they were compiled from. See angr.go.codegen_builtins for the go_render tag protocol the results use.
- angr.go.optimization_passes.runtime_rewriter.classify_runtime_call(name)¶
- class angr.go.optimization_passes.runtime_rewriter.GoRuntimeRewriter¶
Bases:
OptimizationPassRewrite Go runtime calls into map, channel, goroutine, defer and panic/recover statements.
Map slot pointers returned by
mapaccess1/mapassignare folded into the loads and the store that go through them (m[k],m[k] = v); results the runtime writes through a stack pointer (chanrecv) become the value of the rewritten call; open-coded defers (a deferBits byte plus an inline call at every exit) becomedefer.- ARCHES = None¶
- PLATFORMS = None¶
- STAGE: OptimizationPassStage = 7¶
- NAME = 'Rewrite Go runtime calls into Go statements'¶
- __init__(func, manager, **kwargs)¶
- nested_makemap(call)¶
make(map[K]V[, hint])for a makemap call that is not the source of a definition.
- index_call(m, k, bits, tags)¶
- Return type:
- Parameters:
m (Expression)
k (Expression)
bits (int)
tags (dict)
- assign_call(m, k, v, tags)¶
- Return type:
- Parameters:
m (Expression)
k (Expression)
v (Expression)
tags (dict)