Goose  Diff

Differences From Artifact [e5c14a38c3]:

  • File bs/builtins/types/runtime/array.cpp — part of check-in [5c095a9872] at 2019-07-26 02:14:46 on branch trunk — codegen: generate correct function types. (user: achavasse size: 1593)

To Artifact [905d5822ea]:

  • File bs/builtins/types/runtime/array.cpp — part of check-in [3c074f1b7d] at 2019-07-30 22:05:49 on branch trunk —
    • Builtin functions are now explicitely marked if they need to be evaluated eagerly.
    • Using errors out if the expression doesn't evaluate to a constant.
    (user: achavasse size: 1602)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "builtins/builtins.h"

using namespace empathy;
using namespace empathy::builtins;

namespace empathy::builtins
{
    void SetupRuntimeArrayType( Env& e )
    {
        RegisterBuiltinFunc< Value ( Value, uint64_t ) >( e, "RTArray"_sid,
            []( const Value& containedType, uint64_t count )
            {
                if( !GetLLVMType( containedType ) )
                {
                    // TODO come up with some lightweight builtin option type
                    // for the builtin apis, because this is a very bullshit
                    // way to handle errors









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "builtins/builtins.h"

using namespace empathy;
using namespace empathy::builtins;

namespace empathy::builtins
{
    void SetupRuntimeArrayType( Env& e )
    {
        RegisterBuiltinFunc< Eager< Value > ( Value, uint64_t ) >( e, "RTArray"_sid,
            []( const Value& containedType, uint64_t count )
            {
                if( !GetLLVMType( containedType ) )
                {
                    // TODO come up with some lightweight builtin option type
                    // for the builtin apis, because this is a very bullshit
                    // way to handle errors