MCPcopy Create free account
hub / github.com/VKCOM/kphp / dfs_apply_smartcasts

Method dfs_apply_smartcasts

compiler/pipes/cfg.cpp:1138–1157  ·  view source on GitHub ↗

dfs for smart casts calculates narrowed types of var for some usages for example, function f($v) { if(is_int($v)) fInt($v); } note, that unlike other dfs functions, it accepts VarPtr, not UsagePtr, and calculates node_dfs_smartcast_mask for var throughout all reachable cfg nodes it starts from a function root with mask ifi_any_type and traverses all the cfg tree down narrowing current_mask so, a n

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected