mirror of
https://github.com/github/codeql.git
synced 2026-02-20 00:43:44 +01:00
Make CFG for TThen post-order
This commit is contained in:
@@ -1109,7 +1109,8 @@ module Trees {
|
||||
SimplePostOrderStmtSequenceTree() {
|
||||
this instanceof StringInterpolationComponent or
|
||||
this instanceof ParenthesizedExpr or
|
||||
this instanceof BeginBlock
|
||||
this instanceof BeginBlock or
|
||||
this instanceof ASTInternal::TThen
|
||||
}
|
||||
|
||||
final override predicate first(AstNode first) { first(this.getStmt(0), first) }
|
||||
@@ -1138,7 +1139,8 @@ module Trees {
|
||||
not this instanceof StringInterpolationComponent and
|
||||
not this instanceof Block and
|
||||
not this instanceof ParenthesizedExpr and
|
||||
not this instanceof BeginBlock
|
||||
not this instanceof BeginBlock and
|
||||
not this instanceof ASTInternal::TThen
|
||||
}
|
||||
|
||||
final override predicate propagatesAbnormal(AstNode child) { child = this.getAStmt() }
|
||||
|
||||
@@ -41,8 +41,8 @@ break_ensure.rb:
|
||||
#-----| -> In
|
||||
|
||||
# 3| ... > ...
|
||||
#-----| true -> break
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 3| element
|
||||
#-----| -> 0
|
||||
@@ -50,9 +50,6 @@ break_ensure.rb:
|
||||
# 3| 0
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 3| then ...
|
||||
#-----| -> break
|
||||
|
||||
# 4| break
|
||||
#-----| break -> for ... in ...
|
||||
|
||||
@@ -64,16 +61,16 @@ break_ensure.rb:
|
||||
|
||||
# 8| call to nil?
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 8| elements
|
||||
#-----| -> call to nil?
|
||||
|
||||
# 8| then ...
|
||||
#-----| -> self
|
||||
#-----| -> if ...
|
||||
|
||||
# 9| call to puts
|
||||
#-----| -> if ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 9| self
|
||||
#-----| -> "elements nil"
|
||||
@@ -115,8 +112,8 @@ break_ensure.rb:
|
||||
#-----| -> ensure ...
|
||||
|
||||
# 16| ... > ...
|
||||
#-----| true -> break
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 16| element
|
||||
#-----| -> 0
|
||||
@@ -124,9 +121,6 @@ break_ensure.rb:
|
||||
# 16| 0
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 16| then ...
|
||||
#-----| -> break
|
||||
|
||||
# 17| break
|
||||
#-----| break -> [ensure: break] ensure ...
|
||||
|
||||
@@ -144,11 +138,11 @@ break_ensure.rb:
|
||||
|
||||
# 20| call to nil?
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 20| [ensure: break] call to nil?
|
||||
#-----| false -> [ensure: break] if ...
|
||||
#-----| true -> [ensure: break] then ...
|
||||
#-----| true -> [ensure: break] self
|
||||
|
||||
# 20| elements
|
||||
#-----| -> call to nil?
|
||||
@@ -157,17 +151,17 @@ break_ensure.rb:
|
||||
#-----| -> [ensure: break] call to nil?
|
||||
|
||||
# 20| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 20| [ensure: break] then ...
|
||||
#-----| -> [ensure: break] self
|
||||
|
||||
# 21| call to puts
|
||||
#-----| -> if ...
|
||||
|
||||
# 21| [ensure: break] call to puts
|
||||
# 20| [ensure: break] then ...
|
||||
#-----| -> [ensure: break] if ...
|
||||
|
||||
# 21| call to puts
|
||||
#-----| -> then ...
|
||||
|
||||
# 21| [ensure: break] call to puts
|
||||
#-----| -> [ensure: break] then ...
|
||||
|
||||
# 21| self
|
||||
#-----| -> "elements nil"
|
||||
|
||||
@@ -199,14 +193,11 @@ break_ensure.rb:
|
||||
|
||||
# 29| call to nil?
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> return
|
||||
|
||||
# 29| elements
|
||||
#-----| -> call to nil?
|
||||
|
||||
# 29| then ...
|
||||
#-----| -> return
|
||||
|
||||
# 30| return
|
||||
#-----| return -> [ensure: return] ensure ...
|
||||
|
||||
@@ -255,12 +246,12 @@ break_ensure.rb:
|
||||
#-----| -> [ensure: return] In
|
||||
|
||||
# 35| ... > ...
|
||||
#-----| true -> break
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 35| [ensure: return] ... > ...
|
||||
#-----| true -> [ensure: return] break
|
||||
#-----| false -> [ensure: return] if ...
|
||||
#-----| true -> [ensure: return] then ...
|
||||
|
||||
# 35| call to x
|
||||
#-----| -> 0
|
||||
@@ -280,12 +271,6 @@ break_ensure.rb:
|
||||
# 35| [ensure: return] 0
|
||||
#-----| -> [ensure: return] ... > ...
|
||||
|
||||
# 35| then ...
|
||||
#-----| -> break
|
||||
|
||||
# 35| [ensure: return] then ...
|
||||
#-----| -> [ensure: return] break
|
||||
|
||||
# 36| break
|
||||
#-----| break -> for ... in ...
|
||||
|
||||
@@ -336,7 +321,7 @@ break_ensure.rb:
|
||||
|
||||
# 47| ... > ...
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 47| element
|
||||
#-----| -> 1
|
||||
@@ -344,9 +329,6 @@ break_ensure.rb:
|
||||
# 47| 1
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 47| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 48| call to raise
|
||||
#-----| raise -> [ensure: raise] ensure ...
|
||||
|
||||
@@ -370,11 +352,11 @@ break_ensure.rb:
|
||||
|
||||
# 51| ... > ...
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> 10
|
||||
|
||||
# 51| [ensure: raise] ... > ...
|
||||
#-----| false -> [ensure: raise] if ...
|
||||
#-----| true -> [ensure: raise] then ...
|
||||
#-----| true -> [ensure: raise] 10
|
||||
|
||||
# 51| element
|
||||
#-----| -> 0
|
||||
@@ -388,12 +370,6 @@ break_ensure.rb:
|
||||
# 51| [ensure: raise] 0
|
||||
#-----| -> [ensure: raise] ... > ...
|
||||
|
||||
# 51| then ...
|
||||
#-----| -> 10
|
||||
|
||||
# 51| [ensure: raise] then ...
|
||||
#-----| -> [ensure: raise] 10
|
||||
|
||||
# 52| break
|
||||
#-----| break -> for ... in ...
|
||||
|
||||
@@ -439,30 +415,30 @@ case.rb:
|
||||
#-----| -> 1
|
||||
|
||||
# 3| 1
|
||||
#-----| match -> then ...
|
||||
#-----| no-match -> when ...
|
||||
#-----| match -> self
|
||||
|
||||
# 3| then ...
|
||||
#-----| -> self
|
||||
#-----| -> exit if_in_case (normal)
|
||||
|
||||
# 3| ( ... )
|
||||
#-----| -> exit if_in_case (normal)
|
||||
#-----| -> then ...
|
||||
|
||||
# 3| if ...
|
||||
#-----| -> ( ... )
|
||||
|
||||
# 3| call to x2
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 3| self
|
||||
#-----| -> call to x2
|
||||
|
||||
# 3| then ...
|
||||
#-----| -> self
|
||||
#-----| -> if ...
|
||||
|
||||
# 3| call to puts
|
||||
#-----| -> if ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 3| self
|
||||
#-----| -> "x2"
|
||||
@@ -474,14 +450,14 @@ case.rb:
|
||||
#-----| -> 2
|
||||
|
||||
# 4| 2
|
||||
#-----| match -> then ...
|
||||
#-----| match -> self
|
||||
#-----| no-match -> exit if_in_case (normal)
|
||||
|
||||
# 4| then ...
|
||||
#-----| -> self
|
||||
#-----| -> exit if_in_case (normal)
|
||||
|
||||
# 4| call to puts
|
||||
#-----| -> exit if_in_case (normal)
|
||||
#-----| -> then ...
|
||||
|
||||
# 4| self
|
||||
#-----| -> "2"
|
||||
@@ -706,14 +682,14 @@ cfg.rb:
|
||||
#-----| -> 1
|
||||
|
||||
# 42| 1
|
||||
#-----| match -> then ...
|
||||
#-----| no-match -> when ...
|
||||
#-----| match -> self
|
||||
|
||||
# 42| then ...
|
||||
#-----| -> self
|
||||
#-----| -> case ...
|
||||
|
||||
# 42| call to puts
|
||||
#-----| -> case ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 42| self
|
||||
#-----| -> "one"
|
||||
@@ -726,21 +702,21 @@ cfg.rb:
|
||||
|
||||
# 43| 2
|
||||
#-----| no-match -> 3
|
||||
#-----| match -> then ...
|
||||
#-----| match -> self
|
||||
|
||||
# 43| 3
|
||||
#-----| no-match -> 4
|
||||
#-----| match -> then ...
|
||||
#-----| match -> self
|
||||
|
||||
# 43| 4
|
||||
#-----| no-match -> else ...
|
||||
#-----| match -> then ...
|
||||
#-----| match -> self
|
||||
|
||||
# 43| then ...
|
||||
#-----| -> self
|
||||
#-----| -> case ...
|
||||
|
||||
# 43| call to puts
|
||||
#-----| -> case ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 43| self
|
||||
#-----| -> "some"
|
||||
@@ -767,8 +743,8 @@ cfg.rb:
|
||||
#-----| -> b
|
||||
|
||||
# 48| ... == ...
|
||||
#-----| true -> then ...
|
||||
#-----| false -> when ...
|
||||
#-----| true -> self
|
||||
|
||||
# 48| b
|
||||
#-----| -> 1
|
||||
@@ -777,10 +753,10 @@ cfg.rb:
|
||||
#-----| -> ... == ...
|
||||
|
||||
# 48| then ...
|
||||
#-----| -> self
|
||||
#-----| -> chained
|
||||
|
||||
# 48| call to puts
|
||||
#-----| -> chained
|
||||
#-----| -> then ...
|
||||
|
||||
# 48| self
|
||||
#-----| -> "one"
|
||||
@@ -792,7 +768,7 @@ cfg.rb:
|
||||
#-----| -> b
|
||||
|
||||
# 49| ... == ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
#-----| false -> b
|
||||
|
||||
# 49| b
|
||||
@@ -802,7 +778,7 @@ cfg.rb:
|
||||
#-----| -> ... == ...
|
||||
|
||||
# 49| ... > ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
#-----| false -> chained
|
||||
|
||||
# 49| b
|
||||
@@ -812,10 +788,10 @@ cfg.rb:
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 49| then ...
|
||||
#-----| -> self
|
||||
#-----| -> chained
|
||||
|
||||
# 49| call to puts
|
||||
#-----| -> chained
|
||||
#-----| -> then ...
|
||||
|
||||
# 49| self
|
||||
#-----| -> "some"
|
||||
@@ -1042,7 +1018,7 @@ cfg.rb:
|
||||
#-----| -> ;
|
||||
|
||||
# 75| ... < ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> 0
|
||||
#-----| false -> x
|
||||
|
||||
# 75| x
|
||||
@@ -1052,17 +1028,17 @@ cfg.rb:
|
||||
#-----| -> ... < ...
|
||||
|
||||
# 75| then ...
|
||||
#-----| -> 0
|
||||
#-----| -> if ...
|
||||
|
||||
# 75| 0
|
||||
#-----| -> if ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 75| elsif ...
|
||||
#-----| -> if ...
|
||||
|
||||
# 75| ... > ...
|
||||
#-----| false -> else ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> 10
|
||||
|
||||
# 75| x
|
||||
#-----| -> 10
|
||||
@@ -1071,10 +1047,10 @@ cfg.rb:
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 75| then ...
|
||||
#-----| -> 10
|
||||
#-----| -> elsif ...
|
||||
|
||||
# 75| 10
|
||||
#-----| -> elsif ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 75| else ...
|
||||
#-----| -> x
|
||||
@@ -1154,7 +1130,7 @@ cfg.rb:
|
||||
|
||||
# 91| ... > ...
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> next
|
||||
|
||||
# 91| x
|
||||
#-----| -> 3
|
||||
@@ -1162,9 +1138,6 @@ cfg.rb:
|
||||
# 91| 3
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 91| then ...
|
||||
#-----| -> next
|
||||
|
||||
# 91| next
|
||||
#-----| next -> In
|
||||
|
||||
@@ -1810,7 +1783,7 @@ cfg.rb:
|
||||
|
||||
# 172| ... == ...
|
||||
#-----| true -> else ...
|
||||
#-----| false -> then ...
|
||||
#-----| false -> self
|
||||
|
||||
# 172| x
|
||||
#-----| -> 10
|
||||
@@ -1819,10 +1792,10 @@ cfg.rb:
|
||||
#-----| -> ... == ...
|
||||
|
||||
# 172| then ...
|
||||
#-----| -> self
|
||||
#-----| -> unless ...
|
||||
|
||||
# 172| call to puts
|
||||
#-----| -> unless ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 172| self
|
||||
#-----| -> "hi"
|
||||
@@ -1980,7 +1953,7 @@ cfg.rb:
|
||||
|
||||
# 184| ... == ...
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> redo
|
||||
|
||||
# 184| x
|
||||
#-----| -> 5
|
||||
@@ -1988,9 +1961,6 @@ cfg.rb:
|
||||
# 184| 5
|
||||
#-----| -> ... == ...
|
||||
|
||||
# 184| then ...
|
||||
#-----| -> redo
|
||||
|
||||
# 184| redo
|
||||
#-----| redo -> do ...
|
||||
|
||||
@@ -2114,7 +2084,7 @@ exit.rb:
|
||||
|
||||
# 2| ... > ...
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 2| x
|
||||
#-----| -> 2
|
||||
@@ -2122,9 +2092,6 @@ exit.rb:
|
||||
# 2| 2
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 2| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 3| call to exit
|
||||
#-----| exit -> exit m1 (abnormal)
|
||||
|
||||
@@ -2165,7 +2132,7 @@ exit.rb:
|
||||
|
||||
# 9| ... > ...
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 9| x
|
||||
#-----| -> 2
|
||||
@@ -2173,9 +2140,6 @@ exit.rb:
|
||||
# 9| 2
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 9| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 10| call to abort
|
||||
#-----| exit -> exit m2 (abnormal)
|
||||
|
||||
@@ -2253,7 +2217,7 @@ ifs.rb:
|
||||
#-----| -> exit m1 (normal)
|
||||
|
||||
# 2| ... > ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
#-----| false -> x
|
||||
|
||||
# 2| x
|
||||
@@ -2263,10 +2227,10 @@ ifs.rb:
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 2| then ...
|
||||
#-----| -> self
|
||||
#-----| -> if ...
|
||||
|
||||
# 3| call to puts
|
||||
#-----| -> if ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 3| self
|
||||
#-----| -> "x is greater than 2"
|
||||
@@ -2285,7 +2249,7 @@ ifs.rb:
|
||||
#-----| false -> else ...
|
||||
|
||||
# 4| [true] ... and ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 4| [false] ... and ...
|
||||
#-----| false -> [false] ... and ...
|
||||
@@ -2332,10 +2296,10 @@ ifs.rb:
|
||||
#-----| -> ... == ...
|
||||
|
||||
# 4| then ...
|
||||
#-----| -> self
|
||||
#-----| -> elsif ...
|
||||
|
||||
# 5| call to puts
|
||||
#-----| -> elsif ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 5| self
|
||||
#-----| -> "x is 1"
|
||||
@@ -2374,10 +2338,7 @@ ifs.rb:
|
||||
|
||||
# 12| b
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 12| then ...
|
||||
#-----| -> 0
|
||||
#-----| true -> 0
|
||||
|
||||
# 13| return
|
||||
#-----| return -> exit m2 (normal)
|
||||
@@ -2410,7 +2371,7 @@ ifs.rb:
|
||||
|
||||
# 19| ... < ...
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> x
|
||||
|
||||
# 19| x
|
||||
#-----| -> 0
|
||||
@@ -2419,7 +2380,7 @@ ifs.rb:
|
||||
#-----| -> ... < ...
|
||||
|
||||
# 19| then ...
|
||||
#-----| -> x
|
||||
#-----| -> if ...
|
||||
|
||||
# 20| ... = ...
|
||||
#-----| -> x
|
||||
@@ -2434,11 +2395,11 @@ ifs.rb:
|
||||
#-----| -> - ...
|
||||
|
||||
# 21| if ...
|
||||
#-----| -> if ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 21| ... > ...
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> x
|
||||
|
||||
# 21| x
|
||||
#-----| -> 10
|
||||
@@ -2447,10 +2408,10 @@ ifs.rb:
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 21| then ...
|
||||
#-----| -> x
|
||||
#-----| -> if ...
|
||||
|
||||
# 22| ... = ...
|
||||
#-----| -> if ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 22| x
|
||||
#-----| -> x
|
||||
@@ -2562,7 +2523,7 @@ ifs.rb:
|
||||
#-----| false -> else ...
|
||||
|
||||
# 33| [true] ( ... )
|
||||
#-----| true -> then ...
|
||||
#-----| true -> "b2 || b4 || b5"
|
||||
|
||||
# 33| [false] if ...
|
||||
#-----| false -> [false] ( ... )
|
||||
@@ -2571,15 +2532,18 @@ ifs.rb:
|
||||
#-----| true -> [true] ( ... )
|
||||
|
||||
# 33| b1
|
||||
#-----| true -> then ...
|
||||
#-----| true -> b2
|
||||
#-----| false -> b3
|
||||
|
||||
# 33| then ...
|
||||
#-----| -> b2
|
||||
# 33| [false] then ...
|
||||
#-----| false -> [false] if ...
|
||||
|
||||
# 33| [true] then ...
|
||||
#-----| true -> [true] if ...
|
||||
|
||||
# 33| b2
|
||||
#-----| false -> [false] if ...
|
||||
#-----| true -> [true] if ...
|
||||
#-----| false -> [false] then ...
|
||||
#-----| true -> [true] then ...
|
||||
|
||||
# 33| [false] elsif ...
|
||||
#-----| false -> [false] if ...
|
||||
@@ -2589,14 +2553,17 @@ ifs.rb:
|
||||
|
||||
# 33| b3
|
||||
#-----| false -> else ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> b4
|
||||
|
||||
# 33| then ...
|
||||
#-----| -> b4
|
||||
# 33| [false] then ...
|
||||
#-----| false -> [false] elsif ...
|
||||
|
||||
# 33| [true] then ...
|
||||
#-----| true -> [true] elsif ...
|
||||
|
||||
# 33| b4
|
||||
#-----| false -> [false] elsif ...
|
||||
#-----| true -> [true] elsif ...
|
||||
#-----| false -> [false] then ...
|
||||
#-----| true -> [true] then ...
|
||||
|
||||
# 33| else ...
|
||||
#-----| -> b5
|
||||
@@ -2606,10 +2573,10 @@ ifs.rb:
|
||||
#-----| true -> [true] elsif ...
|
||||
|
||||
# 33| then ...
|
||||
#-----| -> "b2 || b4 || b5"
|
||||
#-----| -> if ...
|
||||
|
||||
# 33| "b2 || b4 || b5"
|
||||
#-----| -> if ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 33| else ...
|
||||
#-----| -> "!b2 || !b4 || !b5"
|
||||
@@ -2689,13 +2656,13 @@ ifs.rb:
|
||||
|
||||
# 47| b
|
||||
#-----| false -> else ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 47| then ...
|
||||
#-----| -> self
|
||||
#-----| -> if ...
|
||||
|
||||
# 48| call to puts
|
||||
#-----| -> if ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 48| self
|
||||
#-----| -> "true"
|
||||
@@ -2824,7 +2791,7 @@ loops.rb:
|
||||
#-----| -> self
|
||||
|
||||
# 12| ... > ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> break
|
||||
#-----| false -> x
|
||||
|
||||
# 12| x
|
||||
@@ -2833,9 +2800,6 @@ loops.rb:
|
||||
# 12| 100
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 12| then ...
|
||||
#-----| -> break
|
||||
|
||||
# 13| break
|
||||
#-----| break -> while ...
|
||||
|
||||
@@ -2843,7 +2807,7 @@ loops.rb:
|
||||
#-----| -> if ...
|
||||
|
||||
# 14| ... > ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> next
|
||||
#-----| false -> x
|
||||
|
||||
# 14| x
|
||||
@@ -2852,9 +2816,6 @@ loops.rb:
|
||||
# 14| 50
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 14| then ...
|
||||
#-----| -> next
|
||||
|
||||
# 15| next
|
||||
#-----| next -> x
|
||||
|
||||
@@ -2863,7 +2824,7 @@ loops.rb:
|
||||
|
||||
# 16| ... > ...
|
||||
#-----| false -> elsif ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> redo
|
||||
|
||||
# 16| x
|
||||
#-----| -> 10
|
||||
@@ -2871,9 +2832,6 @@ loops.rb:
|
||||
# 16| 10
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 16| then ...
|
||||
#-----| -> redo
|
||||
|
||||
# 17| redo
|
||||
#-----| redo -> do ...
|
||||
|
||||
@@ -3020,7 +2978,7 @@ raise.rb:
|
||||
|
||||
# 8| ... > ...
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 8| x
|
||||
#-----| -> 2
|
||||
@@ -3028,9 +2986,6 @@ raise.rb:
|
||||
# 8| 2
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 8| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 9| call to raise
|
||||
#-----| raise -> exit m1 (abnormal)
|
||||
|
||||
@@ -3071,10 +3026,7 @@ raise.rb:
|
||||
|
||||
# 16| b
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 16| then ...
|
||||
#-----| -> self
|
||||
#-----| true -> self
|
||||
|
||||
# 17| call to raise
|
||||
#-----| raise -> rescue ...
|
||||
@@ -3089,14 +3041,14 @@ raise.rb:
|
||||
#-----| -> ExceptionA
|
||||
|
||||
# 19| ExceptionA
|
||||
#-----| match -> then ...
|
||||
#-----| match -> self
|
||||
#-----| raise -> exit m2 (abnormal)
|
||||
|
||||
# 19| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 20| call to puts
|
||||
#-----| -> self
|
||||
#-----| -> then ...
|
||||
|
||||
# 20| self
|
||||
#-----| -> "Rescued"
|
||||
@@ -3132,10 +3084,7 @@ raise.rb:
|
||||
|
||||
# 27| b
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 27| then ...
|
||||
#-----| -> self
|
||||
#-----| true -> self
|
||||
|
||||
# 28| call to raise
|
||||
#-----| raise -> rescue ...
|
||||
@@ -3147,13 +3096,13 @@ raise.rb:
|
||||
#-----| -> call to raise
|
||||
|
||||
# 30| rescue ...
|
||||
#-----| -> then ...
|
||||
#-----| -> self
|
||||
|
||||
# 30| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 31| call to puts
|
||||
#-----| -> self
|
||||
#-----| -> then ...
|
||||
|
||||
# 31| self
|
||||
#-----| -> "Rescued"
|
||||
@@ -3189,10 +3138,7 @@ raise.rb:
|
||||
|
||||
# 38| b
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 38| then ...
|
||||
#-----| -> self
|
||||
#-----| true -> self
|
||||
|
||||
# 39| call to raise
|
||||
#-----| raise -> rescue ...
|
||||
@@ -3207,13 +3153,13 @@ raise.rb:
|
||||
#-----| -> e
|
||||
|
||||
# 41| e
|
||||
#-----| -> then ...
|
||||
#-----| -> self
|
||||
|
||||
# 41| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 42| call to puts
|
||||
#-----| -> self
|
||||
#-----| -> then ...
|
||||
|
||||
# 42| self
|
||||
#-----| -> "Rescued {e}"
|
||||
@@ -3249,10 +3195,7 @@ raise.rb:
|
||||
|
||||
# 49| b
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 49| then ...
|
||||
#-----| -> self
|
||||
#-----| true -> self
|
||||
|
||||
# 50| call to raise
|
||||
#-----| raise -> rescue ...
|
||||
@@ -3300,10 +3243,7 @@ raise.rb:
|
||||
|
||||
# 59| b
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 59| then ...
|
||||
#-----| -> self
|
||||
#-----| true -> self
|
||||
|
||||
# 60| call to raise
|
||||
#-----| raise -> rescue ...
|
||||
@@ -3326,13 +3266,13 @@ raise.rb:
|
||||
#-----| raise -> exit m6 (abnormal)
|
||||
|
||||
# 62| e
|
||||
#-----| -> then ...
|
||||
#-----| -> self
|
||||
|
||||
# 62| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 63| call to puts
|
||||
#-----| -> self
|
||||
#-----| -> then ...
|
||||
|
||||
# 63| self
|
||||
#-----| -> "Rescued {e}"
|
||||
@@ -3370,7 +3310,7 @@ raise.rb:
|
||||
#-----| -> self
|
||||
|
||||
# 69| ... > ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
#-----| false -> x
|
||||
|
||||
# 69| x
|
||||
@@ -3379,9 +3319,6 @@ raise.rb:
|
||||
# 69| 2
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 69| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 70| call to raise
|
||||
#-----| raise -> [ensure: raise] ensure ...
|
||||
|
||||
@@ -3396,7 +3333,7 @@ raise.rb:
|
||||
|
||||
# 71| ... < ...
|
||||
#-----| false -> elsif ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> "x < 0"
|
||||
|
||||
# 71| x
|
||||
#-----| -> 0
|
||||
@@ -3404,9 +3341,6 @@ raise.rb:
|
||||
# 71| 0
|
||||
#-----| -> ... < ...
|
||||
|
||||
# 71| then ...
|
||||
#-----| -> "x < 0"
|
||||
|
||||
# 72| return
|
||||
#-----| return -> [ensure: return] ensure ...
|
||||
|
||||
@@ -3488,7 +3422,7 @@ raise.rb:
|
||||
#-----| -> self
|
||||
|
||||
# 82| ... > ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
#-----| false -> x
|
||||
|
||||
# 82| x
|
||||
@@ -3497,9 +3431,6 @@ raise.rb:
|
||||
# 82| 2
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 82| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 83| call to raise
|
||||
#-----| raise -> [ensure: raise] ensure ...
|
||||
|
||||
@@ -3514,7 +3445,7 @@ raise.rb:
|
||||
|
||||
# 84| ... < ...
|
||||
#-----| false -> elsif ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> "x < 0"
|
||||
|
||||
# 84| x
|
||||
#-----| -> 0
|
||||
@@ -3522,9 +3453,6 @@ raise.rb:
|
||||
# 84| 0
|
||||
#-----| -> ... < ...
|
||||
|
||||
# 84| then ...
|
||||
#-----| -> "x < 0"
|
||||
|
||||
# 85| return
|
||||
#-----| return -> [ensure: return] ensure ...
|
||||
|
||||
@@ -3621,7 +3549,7 @@ raise.rb:
|
||||
#-----| -> self
|
||||
|
||||
# 97| ... > ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
#-----| false -> x
|
||||
|
||||
# 97| x
|
||||
@@ -3630,9 +3558,6 @@ raise.rb:
|
||||
# 97| 2
|
||||
#-----| -> ... > ...
|
||||
|
||||
# 97| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 98| call to raise
|
||||
#-----| raise -> [ensure: raise] ensure ...
|
||||
|
||||
@@ -3647,7 +3572,7 @@ raise.rb:
|
||||
|
||||
# 99| ... < ...
|
||||
#-----| false -> elsif ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> "x < 0"
|
||||
|
||||
# 99| x
|
||||
#-----| -> 0
|
||||
@@ -3655,9 +3580,6 @@ raise.rb:
|
||||
# 99| 0
|
||||
#-----| -> ... < ...
|
||||
|
||||
# 99| then ...
|
||||
#-----| -> "x < 0"
|
||||
|
||||
# 100| return
|
||||
#-----| return -> [ensure: return] ensure ...
|
||||
|
||||
@@ -3720,24 +3642,15 @@ raise.rb:
|
||||
|
||||
# 106| b1
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 106| [ensure: return] b1
|
||||
#-----| false -> [ensure: return] if ...
|
||||
#-----| true -> [ensure: return] then ...
|
||||
#-----| true -> [ensure: return] self
|
||||
|
||||
# 106| [ensure: raise] b1
|
||||
#-----| false -> [ensure: raise] if ...
|
||||
#-----| true -> [ensure: raise] then ...
|
||||
|
||||
# 106| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 106| [ensure: return] then ...
|
||||
#-----| -> [ensure: return] self
|
||||
|
||||
# 106| [ensure: raise] then ...
|
||||
#-----| -> [ensure: raise] self
|
||||
#-----| true -> [ensure: raise] self
|
||||
|
||||
# 107| call to raise
|
||||
#-----| raise -> [ensure(1): raise] ensure ...
|
||||
@@ -3894,24 +3807,15 @@ raise.rb:
|
||||
|
||||
# 116| b2
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
#-----| true -> self
|
||||
|
||||
# 116| [ensure: return] b2
|
||||
#-----| false -> [ensure: return] if ...
|
||||
#-----| true -> [ensure: return] then ...
|
||||
#-----| true -> [ensure: return] self
|
||||
|
||||
# 116| [ensure: raise] b2
|
||||
#-----| false -> [ensure: raise] if ...
|
||||
#-----| true -> [ensure: raise] then ...
|
||||
|
||||
# 116| then ...
|
||||
#-----| -> self
|
||||
|
||||
# 116| [ensure: return] then ...
|
||||
#-----| -> [ensure: return] self
|
||||
|
||||
# 116| [ensure: raise] then ...
|
||||
#-----| -> [ensure: raise] self
|
||||
#-----| true -> [ensure: raise] self
|
||||
|
||||
# 117| call to raise
|
||||
#-----| raise -> exit m9 (abnormal)
|
||||
@@ -4001,10 +3905,7 @@ raise.rb:
|
||||
|
||||
# 130| b
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 130| then ...
|
||||
#-----| -> self
|
||||
#-----| true -> self
|
||||
|
||||
# 131| call to raise
|
||||
#-----| raise -> rescue ...
|
||||
@@ -4027,13 +3928,13 @@ raise.rb:
|
||||
|
||||
# 134| ExceptionB
|
||||
#-----| raise -> [ensure: raise] ensure ...
|
||||
#-----| match -> then ...
|
||||
#-----| match -> self
|
||||
|
||||
# 134| then ...
|
||||
#-----| -> self
|
||||
#-----| -> ensure ...
|
||||
|
||||
# 135| call to puts
|
||||
#-----| -> ensure ...
|
||||
#-----| -> then ...
|
||||
|
||||
# 135| self
|
||||
#-----| -> "ExceptionB"
|
||||
@@ -4093,10 +3994,7 @@ raise.rb:
|
||||
|
||||
# 143| b
|
||||
#-----| false -> if ...
|
||||
#-----| true -> then ...
|
||||
|
||||
# 143| then ...
|
||||
#-----| -> self
|
||||
#-----| true -> self
|
||||
|
||||
# 144| call to raise
|
||||
#-----| raise -> [ensure: raise] ensure ...
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
| local_dataflow.rb:19:5:19:5 | x | local_dataflow.rb:20:6:20:6 | x |
|
||||
| local_dataflow.rb:19:10:19:14 | array | local_dataflow.rb:19:1:21:3 | for ... in ... |
|
||||
| local_dataflow.rb:20:3:20:25 | if ... | local_dataflow.rb:19:16:21:3 | do ... |
|
||||
| local_dataflow.rb:20:12:20:21 | then ... | local_dataflow.rb:20:3:20:25 | if ... |
|
||||
| local_dataflow.rb:20:17:20:21 | break | local_dataflow.rb:19:1:21:3 | for ... in ... |
|
||||
| local_dataflow.rb:24:2:24:8 | break | local_dataflow.rb:23:1:25:3 | while ... |
|
||||
| local_dataflow.rb:24:8:24:8 | 5 | local_dataflow.rb:24:2:24:8 | break |
|
||||
@@ -43,10 +42,8 @@
|
||||
| local_dataflow.rb:32:5:32:25 | bar | local_dataflow.rb:32:1:32:25 | ... = ... |
|
||||
| local_dataflow.rb:32:5:32:25 | bar | local_dataflow.rb:32:1:32:25 | ... = ... |
|
||||
| local_dataflow.rb:34:7:34:7 | x | local_dataflow.rb:35:6:35:6 | x |
|
||||
| local_dataflow.rb:35:12:36:13 | then ... | local_dataflow.rb:35:3:37:5 | if ... |
|
||||
| local_dataflow.rb:36:13:36:13 | 7 | local_dataflow.rb:36:6:36:13 | return |
|
||||
| local_dataflow.rb:41:7:41:7 | x | local_dataflow.rb:42:6:42:6 | x |
|
||||
| local_dataflow.rb:42:12:43:13 | then ... | local_dataflow.rb:42:3:44:5 | if ... |
|
||||
| local_dataflow.rb:43:13:43:13 | 7 | local_dataflow.rb:43:6:43:13 | return |
|
||||
| local_dataflow.rb:45:10:45:10 | 6 | local_dataflow.rb:45:3:45:10 | return |
|
||||
| local_dataflow.rb:49:3:53:3 | <captured> | local_dataflow.rb:50:18:50:18 | x |
|
||||
|
||||
Reference in New Issue
Block a user