Goose  Artifact [01687be979]

Artifact 01687be979eab12cf08f3cbb8648d1c1c7693b9cc464136f1cce97001827769d:

  • File bs/builtins/types/lower.cpp — part of check-in [1793989d05] at 2024-02-09 18:05:28 on branch trunk — Lowering: completely reworked all lowering to happen in the same two unified extension points upstream of all three CIR consumers (user: zlodo size: 717)

#include "builtins/builtins.h"
#include "parse/parse.h"

using namespace goose::parse;
using namespace goose::cir;

namespace goose::builtins
{
    void SetupLower( Env& e )
    {
        // Default implementation of LowerType():
        // Do nothing.
        RegisterBuiltinFunc< Intrinsic< Value ( Value ) > >( e, e.extLowerType(),
            []( const Context& c, const Value& v )
            {
                return v;
            } );

        // Default implementation of LowerValue():
        // Do nothing.
        RegisterBuiltinFunc< Intrinsic< Value ( Value ) > >( e, e.extLowerValue(),
            []( const Context& c, const Value& v )
            {
                return v;
            } );
    }
}