File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
shared/rangeanalysis/codeql/rangeanalysis Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,18 @@ signature module Semantic {
257
257
/**
258
258
* A phi node in the SSA form. A phi node is a kind of node in the SSA form
259
259
* that represents a merge point where multiple control flow paths converge
260
- * and the value of a variable needs to be selected.
260
+ * and the value of a variable needs to be selected according to which
261
+ * control flow path was taken. For example, in the following Ruby code:
262
+ * ```rb
263
+ * if b
264
+ * x = 0
265
+ * else
266
+ * x = 1
267
+ * end
268
+ * puts x
269
+ * ```
270
+ * A phi node for `x` is inserted just before the call `puts x`, since the
271
+ * value of `x` may come from either `x = 0` or `x = 1`.
261
272
*/
262
273
class SsaPhiNode extends SsaVariable {
263
274
/** Holds if `inp` is an input to the phi node along the edge originating in `bb`. */
You can’t perform that action at this time.
0 commit comments