Goose  Diff

Differences From Artifact [0b07178c59]:

  • File bs/cir/instruction.cpp — part of check-in [0d5427d49b] at 2022-05-23 08:44:00 on branch cir-stack-language —
    • CIR instructions are now stored in lists
    • Execute: handle the stack
    • Converted some instructions to use the stack
    (user: zlodo size: 2665)

To Artifact [6bc873bf13]:

  • File bs/cir/instruction.cpp — part of check-in [7992dbe59f] at 2022-05-25 17:28:04 on branch cir-stack-language —
    • Split function invocation code into several specialized versions for each function kind
    • Almost fully completed the migration of CIR to a stack language
    • Compilation-time execution works again
    (user: zlodo size: 2433)

51
52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

86
87
88
89
90
91
92
93
51
52
53
54
55
56
57


58
59
60
61
62
63
64
65





66
67
68
69
70
71
72
73
74
75
76
77


78

79
80
81
82
83
84
85







-
-
+







-
-
-
-
-












-
-
+
-







    {
        out << "LOAD(";
         return out << ins.m_type << ')';
    }

    ostream& operator<<( ostream& out, const Store& ins )
    {
        out << "STORE(";
        return out << ins.m_val << ')';
        return out << "STORE";
    }

    ostream& operator<<( ostream& out, const PHOverride& ins )
    {
        return out << "PHOVERRIDE(" << ins.m_name << ", " << ins.m_phVal << ", " << ins.m_val << ')';
    }

    bool Store::canBeEagerlyEvaluated() const
    {
        return /*m_addr &&*/ CanValueBeEagerlyEvaluated( m_val );
    }

    bool Select::operator<( const Select& rhs ) const
    {
        return m_memberIndex < rhs.m_memberIndex;
    }

    bool Load::operator<( const Load& rhs ) const
    {
        return m_type < rhs.m_type;
    }

    bool Store::operator<( const Store& rhs ) const
    {
        if( m_type != rhs.m_type )
            return m_type < rhs.m_type;
        return m_type < rhs.m_type;
        return m_val < rhs.m_val;
    }

    bool PHOverride::operator<( const PHOverride& rhs ) const
    {
        if( m_name != rhs.m_name )
            return m_name < rhs.m_name;
        if( m_phVal != rhs.m_phVal )