Goose  Artifact [b1fe9ac8f5]

Artifact b1fe9ac8f58354e8a639e0f08f0a95e38c881ef24ecf948417cebe73c6c931bc:

  • File bs/g0api/types.h — part of check-in [2503738366] at 2022-05-15 19:25:47 on branch trunk — cir: implemented a helper object to decorate operations such as calls with a prologue and an epilogue, not used yet. (user: zlodo size: 2046)

#ifndef GOOSE_G0API_TYPEWRAPPERS_H
#define GOOSE_G0API_TYPEWRAPPERS_H

namespace goose::g0api
{
    extern void SetupTypeWrappers( Env& e );
}

namespace goose::builtins
{
    template<>
    struct TypeWrapperTraits< ptr< codegen::Module > >
    {
        static auto typeId() { return "CGModule"_sid; }
    };

    template<>
    struct TypeWrapperTraits< LocationId >
    {
        static auto typeId() { return "LocationId"_sid; }
    };

    template<>
    struct TypeWrapperTraits< StringId >
    {
        static auto typeId() { return "StringId"_sid; }
    };

    template<>
    struct TypeWrapperTraits< Hole >
    {
        static auto typeId() { return "Hole"_sid; }
    };

    template<>
    struct TypeWrapperTraits< AnyTerm >
    {
        static auto typeId() { return "AnyTerm"_sid; }
    };

    template<>
    struct TypeWrapperTraits< VecOfLength >
    {
        static auto typeId() { return "VecOfLength"_sid; }
    };

    template<>
    struct TypeWrapperTraits< pvec >
    {
        static auto typeId() { return "Vec"_sid; }
    };

    template<>
    struct TypeWrapperTraits< APSInt >
    {
        static auto typeId() { return "FixedInt"_sid; }
    };

    template<>
    struct TypeWrapperTraits< ptr< cir::BasicBlock > >
    {
        static auto typeId() { return "BasicBlock"_sid; }
    };

    template<>
    struct TypeWrapperTraits< wptr< cir::BasicBlock > >
    {
        static auto typeId() { return "BasicBlock"_sid; }
    };

    template<>
    struct TypeWrapperTraits< ptr< cir::Instruction > >
    {
        static auto typeId() { return "Instruction"_sid; }
    };

    template<>
    struct TypeWrapperTraits< ptr< cir::Terminator > >
    {
        static auto typeId() { return "Terminator"_sid; }
    };

    template<>
    struct TypeWrapperTraits< ptr< cir::Decorator > >
    {
        static auto typeId() { return "Decorator"_sid; }
    };

    template<>
    struct TypeWrapperTraits< ptr< ReferenceType > >
    {
        static auto typeId() { return "ReferenceType"_sid; }
    };
}

#endif