<commit_before>#ifndef LILY_VM_H
# define LILY_VM_H

# include "lily_raiser.h"
# include "lily_symtab.h"
# include "lily_type_system.h"

struct lily_base_seed_;

typedef struct lily_call_frame_ {
    lily_function_val *function;
    signed int return_reg;
    /* How many registers this call uses. This is used to fix the vm's register
       stack after a call. */
    int regs_used;
    uint16_t *code;
    int code_pos;
    int line_num;

    uint32_t offset_to_main;

    lily_value **upvalues;

    /* This is set to the value of 'self' within the ::new of a class. The
       instruction o_new_instance uses this to determine if a constructor is
       being executed from a higher-up class. If that is the case, then the
       subclass uses the value of the higher-up class. */
    lily_instance_val *build_value;

    struct lily_call_frame_ *prev;
    struct lily_call_frame_ *next;
} lily_call_frame;

typedef struct lily_vm_catch_entry_ {
    lily_call_frame *call_frame;
    /* How far away vm->vm_regs (where the locals start) is from
       vm->regs_from_main in the current frame. When catching exceptions, it's
       simpler, safer, and faster to fix vm->vm_regs with this instead of
       attempting to walk the call chain backward to figure out where
       vm->vm_regs will end up. */
    int offset_from_main;
    int code_pos;
    uint32_t call_frame_depth;
    uint32_t dispatch_restore;
    lily_jump_link *jump_entry;

    struct lily_vm_catch_entry_ *next;
    struct lily_vm_catch_entry_ *prev;
} lily_vm_catch_entry;

typedef struct {
    lily_value **values;
    uint32_t pos;
    uint32_t size;
} lily_vm_list;

typedef struct lily_vm_state_ {
    lily_value **vm_regs;
    lily_value **regs_from_main;
    lily_call_frame *call_chain;

    lily_tie **readonly_table;

    /* A linked list of entries that are currently being used. */
    lily_gc_entry *gc_live_entries;
    /* A linked list of entries not currently used. Entries which have their
       values swept are put here. This is checked before making a new node. */

    lily_gc_entry *gc_spare_entries;

    uint32_t num_registers;
<commit_msg>Rename an unused field from dispatch_restore to just pad.<commit_after>#ifndef LILY_VM_H
# define LILY_VM_H

# include "lily_raiser.h"
# include "lily_symtab.h"
# include "lily_type_system.h"

struct lily_base_seed_;

typedef struct lily_call_frame_ {
    lily_function_val *function;
    signed int return_reg;
    /* How many registers this call uses. This is used to fix the vm's register
       stack after a call. */
    int regs_used;
    uint16_t *code;
    int code_pos;
    int line_num;

    uint32_t offset_to_main;

    lily_value **upvalues;

    /* This is set to the value of 'self' within the ::new of a class. The
       instruction o_new_instance uses this to determine if a constructor is
       being executed from a higher-up class. If that is the case, then the
       subclass uses the value of the higher-up class. */
    lily_instance_val *build_value;

    struct lily_call_frame_ *prev;
    struct lily_call_frame_ *next;
} lily_call_frame;

typedef struct lily_vm_catch_entry_ {
    lily_call_frame *call_frame;
    /* How far away vm->vm_regs (where the locals start) is from
       vm->regs_from_main in the current frame. When catching exceptions, it's
       simpler, safer, and faster to fix vm->vm_regs with this instead of
       attempting to walk the call chain backward to figure out where
       vm->vm_regs will end up. */
    int offset_from_main;
    int code_pos;
    uint32_t call_frame_depth;
    uint32_t pad;
    lily_jump_link *jump_entry;

    struct lily_vm_catch_entry_ *next;
    struct lily_vm_catch_entry_ *prev;
} lily_vm_catch_entry;

typedef struct {
    lily_value **values;
    uint32_t pos;
    uint32_t size;
} lily_vm_list;

typedef struct lily_vm_state_ {
    lily_value **vm_regs;
    lily_value **regs_from_main;
    lily_call_frame *call_chain;

    lily_tie **readonly_table;

    /* A linked list of entries that are currently being used. */
    lily_gc_entry *gc_live_entries;
    /* A linked list of entries not currently used. Entries which have their
       values swept are put here. This is checked before making a new node. */

    lily_gc_entry *gc_spare_entries;

    uint32_t num_registers;

{'fraction_non_alphanumeric': 0.06152774553053169, 'fraction_numerical': 0.00650104481077316, 'mean_word_length': 3.2823061630218686, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4574106', 'n_tokens_mistral': 1470, 'n_tokens_neox': 1407, 'n_words': 474}