Goose  Artifact [3fef61de14]

Artifact 3fef61de14dbdca1b57b1ff38f655e772c32405d909a89d976041415aa6231d5:

  • File bs/builtins/builtins.h — part of check-in [68260b65f2] at 2022-03-14 19:23:09 on branch trunk —
    • bracket blocks inlined in the code are no longer proposition lists but a new type of block to contain "ghost code" (ie a verification specific cfg)
    • added a GhostBranch instruction to insert the above in the middle of regular code
    • removed a bunch of hacks to ignore load/stores involving ghost funcs during execution and codegen since they are now separated from normal code using the above
    • miscellaneous other refactorings and improvements
    • as a result ghost code is now more flexible and can use idiomatic tuple assignments to exchange the values of two ghost function closures
    (user: zlodo size: 822)

#ifndef GOOSE_BUILTINS_H
#define GOOSE_BUILTINS_H

#include "eir/eir.h"
#include "cir/cir.h"
#include "sema/sema.h"
#include "diagnostics/diagnostics.h"

namespace goose::builtins
{
    using namespace eir;
    using namespace sema;
    using namespace diagnostics;

    extern const Term& RootG0Identity();
}

#include "codegen/codegen.h"

#include "helpers.h"
#include "builders/codebuilder.h"
#include "types/types.h"
#include "operators/operators.h"
#include "statements/statements.h"
#include "exprhelpers.h"

namespace goose::builtins
{
    extern void SetupDefaultBuilderInterface( Env& e );
    extern void SetupCodeBuilderInterface( Env& e );
    extern void SetupPropositionsBuilderInterface( Env& e );
    extern void SetupGhostCodeBuilderInterface( Env& e );
    extern void SetupBuiltins( Env& e );
}

#endif