<commit_before>#ifndef SL_VALUE_H
#define SL_VALUE_H

#include <stddef.h>
#include <stdint.h>
#include <limits.h>
#include "st.h"

struct sl_vm;

#define SL_MAX_INT (INT_MAX / 2)
#define SL_MIN_INT (INT_MIN / 2)

typedef union slval {
    intptr_t i;
}
SLVAL;

typedef enum sl_primitive_type {
    SL_T__INVALID = 0,
    SL_T_NIL,
    SL_T_FALSE,
    SL_T_TRUE,
    SL_T_CLASS,
    SL_T_OBJECT,
    SL_T_STRING,
    SL_T_INT,
    SL_T_FLOAT,
    SL_T_BIGNUM,
    SL_T_METHOD,
    SL_T_BOUND_METHOD,
    SL_T_ARRAY,
    SL_T_DICT
}
sl_primitive_type_t;

typedef struct sl_object {
    SLVAL klass;
    sl_primitive_type_t primitive_type;
    st_table_t* instance_variables;
    st_table_t* singleton_methods;
}
sl_object_t;

typedef struct sl_class {
    sl_object_t base;
    SLVAL name;
    SLVAL super;
    SLVAL in;
    st_table_t* constants;
    st_table_t* class_variables;
    st_table_t* instance_methods;
    sl_object_t*(*allocator)(struct sl_vm*);
}
sl_class_t;

typedef struct sl_string {
    sl_object_t base;
    char* encoding;
    uint8_t* buff;
    size_t buff_len;
    size_t char_len;
    int hash;
    int hash_set;
}
sl_string_t;

typedef struct sl_method {
    sl_object_t base;
    int initialized;
    SLVAL name;
    SLVAL klass;
    int is_c_func;
    int arity;
    union {
        struct {
            struct sl_vm_section* section;
            struct sl_vm_exec_ctx* parent_ctx;
        } sl;
        struct {
            SLVAL(*func)(/* vm, self, ... */);
        } c;
    } as;
}
sl_method_t;

typedef struct sl_bound_method {
    sl_method_t method;
    SLVAL self;
}
sl_bound_method_t;
<commit_msg>squeeze a few bytes out of sl_method_t<commit_after>#ifndef SL_VALUE_H
#define SL_VALUE_H

#include <stddef.h>
#include <stdint.h>
#include <limits.h>
#include "st.h"

struct sl_vm;

#define SL_MAX_INT (INT_MAX / 2)
#define SL_MIN_INT (INT_MIN / 2)

typedef union slval {
    intptr_t i;
}
SLVAL;

typedef enum sl_primitive_type {
    SL_T__INVALID = 0,
    SL_T_NIL,
    SL_T_FALSE,
    SL_T_TRUE,
    SL_T_CLASS,
    SL_T_OBJECT,
    SL_T_STRING,
    SL_T_INT,
    SL_T_FLOAT,
    SL_T_BIGNUM,
    SL_T_METHOD,
    SL_T_BOUND_METHOD,
    SL_T_ARRAY,
    SL_T_DICT
}
sl_primitive_type_t;

typedef struct sl_object {
    SLVAL klass;
    sl_primitive_type_t primitive_type;
    st_table_t* instance_variables;
    st_table_t* singleton_methods;
}
sl_object_t;

typedef struct sl_class {
    sl_object_t base;
    SLVAL name;
    SLVAL super;
    SLVAL in;
    st_table_t* constants;
    st_table_t* class_variables;
    st_table_t* instance_methods;
    sl_object_t*(*allocator)(struct sl_vm*);
}
sl_class_t;

typedef struct sl_string {
    sl_object_t base;
    char* encoding;
    uint8_t* buff;
    size_t buff_len;
    size_t char_len;
    int hash;
    int hash_set;
}
sl_string_t;

typedef struct sl_method {
    sl_object_t base;
    SLVAL name;
    SLVAL klass;
    char initialized;
    char is_c_func;
    int arity;
    union {
        struct {
            struct sl_vm_section* section;
            struct sl_vm_exec_ctx* parent_ctx;
        } sl;
        struct {
            SLVAL(*func)(/* vm, self, ... */);
        } c;
    } as;
}
sl_method_t;

typedef struct sl_bound_method {
    sl_method_t method;
    SLVAL self;
}
sl_bound_method_t;

{'fraction_non_alphanumeric': 0.08214177061149985, 'fraction_numerical': 0.002433830240340736, 'mean_word_length': 2.827706635622817, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '184680', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1316, 'n_words': 278}