Goose  Diff

Differences From Artifact [5d44705c78]:

  • File bs/cir/helpers.h — part of check-in [f886c2d77c] at 2022-05-28 17:17:43 on branch cir-stack-language — Small optimization. (user: zlodo size: 2786)

To Artifact [f1883ca7ca]:

  • File bs/cir/helpers.h — part of check-in [4f05876cc2] at 2022-06-08 22:38:10 on branch cir-stack-language — Refactored the verifier to use the stack-based CIR. It compiles but isn't re-enabled yet (user: zlodo size: 2890)

67
68
69
70
71
72
73
74
75
76

77

78
79
80
81
82
83
84
    {
        public:
            TempStorage( size_t size ) :
                m_storage( size )
            {}

            template< typename TT >
            void set( uint32_t index, TT&& x )
            {
                if( index < m_storage.size() )

                    m_storage[index] = forward< TT >( x );

            }

            const T* get( uint32_t index ) const
            {
                if( index < m_storage.size() )
                    return &m_storage[index];
                return nullptr;







|

|
>
|
>







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
    {
        public:
            TempStorage( size_t size ) :
                m_storage( size )
            {}

            template< typename TT >
            optional< reference_wrapper< T > > set( uint32_t index, TT&& x )
            {
                if( index >= m_storage.size() )
                    return nullopt;
                m_storage[index] = forward< TT >( x );
                return m_storage[index];
            }

            const T* get( uint32_t index ) const
            {
                if( index < m_storage.size() )
                    return &m_storage[index];
                return nullptr;