Skip to content

Commit

Permalink
remove relative paths in include
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawSumma committed Jul 21, 2024
1 parent fc72a2b commit 7ae52a7
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion vm/ast/ast.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "./ast.h"
#include "ast.h"

void vm_ast_free_form(vm_ast_form_t form) {
for (size_t i = 0; i < form.len; i++) {
Expand Down
8 changes: 4 additions & 4 deletions vm/ast/comp.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

#include "./comp.h"
#include "./ast.h"
#include "./build.h"
#include "./print.h"
#include "comp.h"
#include "ast.h"
#include "build.h"
#include "print.h"
#include "../gc.h"

struct vm_ast_comp_t;
Expand Down
2 changes: 1 addition & 1 deletion vm/errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#if !defined(VM_HEADER_ERRORS)
#define VM_HEADER_ERRORS

#include "./lib.h"
#include "lib.h"

struct vm_location_t;
struct vm_location_range_t;
Expand Down
4 changes: 2 additions & 2 deletions vm/gc.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include "./gc.h"
#include "./ir.h"
#include "gc.h"
#include "ir.h"

struct vm_gc_objs_t;
struct vm_gc_table_cache_t;
Expand Down
2 changes: 1 addition & 1 deletion vm/gc.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if !defined(VM_HEADER_GC)
#define VM_HEADER_GC

#include "./lib.h"
#include "lib.h"

void vm_gc_mark(vm_t *vm, vm_obj_t *top);
void vm_gc_sweep(vm_t *vm);
Expand Down
4 changes: 2 additions & 2 deletions vm/io.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include "./io.h"
#include "./ir.h"
#include "io.h"
#include "ir.h"

void vm_io_buffer_vformat(vm_io_buffer_t *buf, const char *fmt, va_list ap) {
if (buf->buf == NULL) {
Expand Down
2 changes: 1 addition & 1 deletion vm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
struct vm_io_debug_t;
typedef struct vm_io_debug_t vm_io_debug_t;

#include "./obj.h"
#include "obj.h"

struct vm_io_debug_t {
vm_io_debug_t *next;
Expand Down
4 changes: 2 additions & 2 deletions vm/ir.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include "./ir.h"
#include "./io.h"
#include "ir.h"
#include "io.h"

void vm_block_realloc(vm_block_t *block, vm_instr_t instr) {
if (block->len + 4 >= block->alloc) {
Expand Down
6 changes: 3 additions & 3 deletions vm/ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ typedef struct vm_block_t vm_block_t;
typedef struct vm_branch_t vm_branch_t;
typedef struct vm_instr_t vm_instr_t;

#include "./lib.h"
#include "./io.h"
#include "./errors.h"
#include "lib.h"
#include "io.h"
#include "errors.h"

enum {
// there are no more args
Expand Down
2 changes: 1 addition & 1 deletion vm/lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <time.h>
#include <wctype.h>

#include "./vm.h"
#include "vm.h"

#if 0
#define __builtin_trap() \
Expand Down
2 changes: 1 addition & 1 deletion vm/lua/parser/tree_sitter/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
extern "C" {
#endif

#include "./alloc.h"
#include "alloc.h"

#include <assert.h>
#include <stdbool.h>
Expand Down
2 changes: 1 addition & 1 deletion vm/lua/repl.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include "./repl.h"
#include "repl.h"
#include "../ir.h"
#include "../io.h"
#include "../vm.h"
Expand Down
6 changes: 3 additions & 3 deletions vm/obj.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "./obj.h"
#include "./gc.h"
#include "./io.h"
#include "obj.h"
#include "gc.h"
#include "io.h"

bool vm_obj_eq(vm_obj_t v1, vm_obj_t v2) {
if (vm_obj_is_nil(v1) && vm_obj_is_nil(v2)) {
Expand Down
16 changes: 8 additions & 8 deletions vm/std.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

#include "./std.h"

#include "./backend/backend.h"
#include "./errors.h"
#include "./ir.h"
#include "./obj.h"
#include "./gc.h"
#include "./io.h"
#include "std.h"

#include "backend/backend.h"
#include "errors.h"
#include "ir.h"
#include "obj.h"
#include "gc.h"
#include "io.h"

#define VM_LOCATION_RANGE_FUNC ((vm_location_range_t) { .file = "<builtins>", .src = __func__ })

Expand Down
2 changes: 1 addition & 1 deletion vm/std.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if !defined(VM_HEADER_STD_STD)
#define VM_HEADER_STD_STD

#include "./io.h"
#include "io.h"

#define VM_STD_REF(vm, x) (vm_config_add_extern((vm), &(x)), &(x))

Expand Down
12 changes: 6 additions & 6 deletions vm/vm.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

#include "./lib.h"
#include "./vm.h"
#include "lib.h"
#include "vm.h"

#include "./ir.h"
#include "./std.h"
#include "./backend/backend.h"
#include "./gc.h"
#include "ir.h"
#include "std.h"
#include "backend/backend.h"
#include "gc.h"

vm_t *vm_state_new(void) {
vm_obj_t *base = vm_malloc(sizeof(vm_obj_t) * (1 << 20));
Expand Down

0 comments on commit 7ae52a7

Please sign in to comment.