Goose  Artifact [9fd4fd1867]

Artifact 9fd4fd1867c402185fe70ae6e366f08a1f1f9b6100c8416a9d61bfd102180fc2:

  • File bs/builtins/types/runtime/runtime.h — part of check-in [b48e7b7507] at 2021-03-17 00:41:57 on branch trunk —
    • Added a Conversion step after typechecking, to take care of conversions that aren't practical to do during typechecking itself.
    • Added back a proper ct_int to rt_int conversion step that diagnoses out of range integer constants
    (user: achavasse size: 656)

#ifndef GOOSE_BUILTINS_TYPES_RUNTIME_H
#define GOOSE_BUILTINS_TYPES_RUNTIME_H

#include "basic.h"
#include "pointer.h"
#include "array.h"
#include "record.h"

namespace goose::builtins
{
    extern void SetupRuntimeBasicTypes( Env& e );
    extern void SetupRuntimeTypesChecking( Env& e );

    static inline void SetupRuntimeTypes( Env& e )
    {
        SetupRuntimeBasicTypes( e );
        SetupRuntimePointerType( e );
        SetupRuntimeArrayType( e );
        SetupRuntimeRecordType( e );
        SetupRuntimeTypesChecking( e );
    }

    extern bool IsRuntimeType( const Value& t );
    extern llvm::Type* GetLLVMType( const Value& t );
}

#endif