summaryrefslogtreecommitdiff
path: root/src/mongo/db/test_output/exec/sbe/s_b_e_if_test/nested_if_else.txt
blob: 36aef4a19ccc732473949d7024656b83afbbd4e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Golden test output of SBEIfTest/NestedIfElse
-- INPUT EXPRESSION:

    if s2 
    then "then2" 
    else 
        if s1 
        then "then" 
        else "else" 


-- COMPILED EXPRESSION:
[0x0000-0x004e]
0x0000: pushAccessVal(accessor: <accessor>);
0x0009: jmpNothing(target: 0x004e);
0x000e: jmpTrue(target: 0x0044);
0x0013: pushAccessVal(accessor: <accessor>);
0x001c: jmpNothing(target: 0x003f);
0x0021: jmpTrue(target: 0x0035);
0x0026: pushConstVal(value: "else");
0x0030: jmp(target: 0x003f);
0x0035: pushConstVal(value: "then");
0x003f: jmp(target: 0x004e);
0x0044: pushConstVal(value: "then2");


-- EXECUTE VARIATION:
SLOTS: [1: Nothing, 2: Nothing]
RESULT: Nothing

-- EXECUTE VARIATION:
SLOTS: [1: Nothing, 2: false]
RESULT: Nothing

-- EXECUTE VARIATION:
SLOTS: [1: Nothing, 2: true]
RESULT: "then2"

-- EXECUTE VARIATION:
SLOTS: [1: false, 2: Nothing]
RESULT: Nothing

-- EXECUTE VARIATION:
SLOTS: [1: false, 2: false]
RESULT: "else"

-- EXECUTE VARIATION:
SLOTS: [1: false, 2: true]
RESULT: "then2"

-- EXECUTE VARIATION:
SLOTS: [1: true, 2: Nothing]
RESULT: Nothing

-- EXECUTE VARIATION:
SLOTS: [1: true, 2: false]
RESULT: "then"

-- EXECUTE VARIATION:
SLOTS: [1: true, 2: true]
RESULT: "then2"