Goose  Artifact [b65edaaf86]

Artifact b65edaaf86fd04da58de91bbba5178122d1948890dce7e15b741a8b4aface52d:

  • File bs/g0api/types.h — part of check-in [5f6197d1a0] at 2021-09-30 22:07:22 on branch trunk — Correctly generate and link executables on darwin (user: zlodo size: 2034)

#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::CFG > >
    {
        static auto typeId() { return "CFG"_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< ReferenceType > >
    {
        static auto typeId() { return "ReferenceType"_sid; }
    };
}

#endif