Skip to content

Commit

Permalink
Merge branch 'ripa/zig' of https://github.com/urbit/vere into pkova/u…
Browse files Browse the repository at this point in the history
…ndefined2
  • Loading branch information
pkova committed Oct 8, 2024
2 parents 6cafe5f + bb8bdd8 commit 4144e07
Show file tree
Hide file tree
Showing 46 changed files with 142 additions and 146 deletions.
42 changes: 19 additions & 23 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -687,21 +687,21 @@ fn build_single(
"serial.c",
"trace.c",
"urth.c",
"allocate_v1.c",
"hashtable_v1.c",
"jets_v1.c",
"manage_v1.c",
"nock_v1.c",
"vortex_v1.c",
"allocate_v2.c",
"hashtable_v2.c",
"jets_v2.c",
"manage_v2.c",
"nock_v2.c",
"vortex_v2.c",
"hashtable_v3.c",
"manage_v3.c",
"manage_v4.c",
"v1/allocate.c",
"v1/hashtable.c",
"v1/jets.c",
"v1/manage.c",
"v1/nock.c",
"v1/vortex.c",
"v2/allocate.c",
"v2/hashtable.c",
"v2/jets.c",
"v2/manage.c",
"v2/nock.c",
"v2/vortex.c",
"v3/hashtable.c",
"v3/manage.c",
"v4/manage.c",
"vortex.c",
"xtract.c",
"zave.c",
Expand All @@ -713,15 +713,11 @@ fn build_single(
.include_extensions = &.{".h"},
});

pkg_noun.installHeadersDirectory(b.path(switch (t.os.tag) {
.macos => "pkg/noun/platform/darwin",
.linux => "pkg/noun/platform/linux",
pkg_noun.installHeader(b.path(switch (t.os.tag) {
.macos => "pkg/noun/platform/darwin/rsignal.h",
.linux => "pkg/noun/platform/linux/rsignal.h",
else => "",
}), "", .{});

pkg_noun.installHeadersDirectory(b.path("pkg/noun/jets"), "", .{
.include_extensions = &.{".h"},
});
}), "platform/rsignal.h");

// b.installArtifact(pkg_noun);

Expand Down
2 changes: 1 addition & 1 deletion pkg/noun/allocate.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
typedef struct {
c3_w mug_w;
c3_w len_w;
c3_w buf_w[];
c3_w buf_w[0];
} u3a_atom;

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/noun/jets/e/secp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "noun.h"
#include "urcrypt.h"
#include <ent/ent.h>
#include "ent/ent.h"

static urcrypt_secp_context* sec_u;

Expand Down
6 changes: 3 additions & 3 deletions pkg/noun/manage.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// @file

#include "manage.h"
#include "manage_v2.h"
#include "manage_v3.h"
#include "manage_v4.h"
#include "v2/manage.h"
#include "v3/manage.h"
#include "v4/manage.h"

#include <ctype.h>
#include <dlfcn.h>
Expand Down
4 changes: 2 additions & 2 deletions pkg/noun/manage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#ifndef U3_MANAGE_H
#define U3_MANAGE_H

#include "manage_v1.h"
#include "manage_v2.h"
#include "v1/manage.h"
#include "v2/manage.h"

#include "c3/c3.h"
#include "types.h"
Expand Down
6 changes: 3 additions & 3 deletions pkg/noun/allocate_v1.c → pkg/noun/v1/allocate.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// @file

#include "allocate.h"
#include "allocate_v1.h"
#include "../allocate.h"
#include "v1/allocate.h"

#include "hashtable_v1.h"
#include "v1/hashtable.h"

/* _box_v1_slot(): select the right free list to search for a block.
*/
Expand Down
4 changes: 2 additions & 2 deletions pkg/noun/allocate_v1.h → pkg/noun/v1/allocate.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef U3_ALLOCATE_V1_H
#define U3_ALLOCATE_V1_H

#include "allocate.h"
#include "allocate_v2.h"
#include "../allocate.h"
#include "v2/allocate.h"

/** Aliases.
**/
Expand Down
8 changes: 4 additions & 4 deletions pkg/noun/hashtable_v1.c → pkg/noun/v1/hashtable.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/// @file

#include "hashtable.h"
#include "hashtable_v1.h"
#include "../hashtable.h"
#include "v1/hashtable.h"

#include "allocate.h"
#include "allocate_v1.h"
#include "../allocate.h"
#include "v1/allocate.h"


/* _ch_v1_popcount(): number of bits set in word. A standard intrinsic.
Expand Down
4 changes: 2 additions & 2 deletions pkg/noun/hashtable_v1.h → pkg/noun/v1/hashtable.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef U3_HASHTABLE_V1_H
#define U3_HASHTABLE_V1_H

#include "hashtable.h"
#include "hashtable_v2.h"
#include "../hashtable.h"
#include "v2/hashtable.h"

/** Aliases.
**/
Expand Down
12 changes: 6 additions & 6 deletions pkg/noun/jets_v1.c → pkg/noun/v1/jets.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/// @file

#include "vortex.h"
#include "../vortex.h"

#include "jets.h"
#include "jets_v1.h"
#include "jets_v2.h"
#include "../jets.h"
#include "v1/jets.h"
#include "v2/jets.h"

#include "allocate_v1.h"
#include "hashtable_v1.h"
#include "v1/allocate.h"
#include "v1/hashtable.h"


/* _cj_fink_free(): lose and free everything in a u3j_v1_fink.
Expand Down
4 changes: 2 additions & 2 deletions pkg/noun/jets_v1.h → pkg/noun/v1/jets.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#ifndef U3_JETS_V1_H
#define U3_JETS_V1_H

#include "jets.h"
#include "jets_v2.h"
#include "../jets.h"
#include "v2/jets.h"

/** Aliases.
**/
Expand Down
12 changes: 6 additions & 6 deletions pkg/noun/manage_v1.c → pkg/noun/v1/manage.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// @file

#include "manage_v1.h"
#include "v1/manage.h"

#include "allocate_v1.h"
#include "hashtable_v1.h"
#include "jets_v1.h"
#include "nock_v1.h"
#include "vortex_v1.h"
#include "v1/allocate.h"
#include "v1/hashtable.h"
#include "v1/jets.h"
#include "v1/nock.h"
#include "v1/vortex.h"

/* u3m_v1_reclaim: clear persistent caches to reclaim memory
*/
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions pkg/noun/nock_v1.c → pkg/noun/v1/nock.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// @file

#include "nock.h"
#include "nock_v1.h"
#include "../nock.h"
#include "v1/nock.h"

#include "allocate_v1.h"
#include "hashtable_v1.h"
#include "jets.h"
#include "jets_v1.h"
#include "v1/allocate.h"
#include "v1/hashtable.h"
#include "../jets.h"
#include "v1/jets.h"

/* u3n_v1_reclaim(): clear ad-hoc persistent caches to reclaim memory.
*/
Expand Down
2 changes: 1 addition & 1 deletion pkg/noun/nock_v1.h → pkg/noun/v1/nock.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef U3_NOCK_V1_H
#define U3_NOCK_V1_H

#include "nock_v2.h"
#include "v2/nock.h"

/** Aliases.
**/
Expand Down
6 changes: 3 additions & 3 deletions pkg/noun/vortex_v1.c → pkg/noun/v1/vortex.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// @file

#include "vortex.h"
#include "vortex_v1.h"
#include "../vortex.h"
#include "v1/vortex.h"

#include "allocate_v1.h"
#include "v1/allocate.h"

/* u3v_v1_reclaim(): clear ad-hoc persistent caches to reclaim memory.
*/
Expand Down
4 changes: 2 additions & 2 deletions pkg/noun/vortex_v1.h → pkg/noun/v1/vortex.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#ifndef U3_VORTEX_V1_H
#define U3_VORTEX_V1_H

#include "allocate.h"
#include "vortex_v2.h"
#include "../allocate.h"
#include "v2/vortex.h"

/** Aliases.
**/
Expand Down
10 changes: 5 additions & 5 deletions pkg/noun/allocate_v2.c → pkg/noun/v2/allocate.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// @file

#include "allocate.h"
#include "allocate_v1.h"
#include "allocate_v2.h"
#include "../allocate.h"
#include "v1/allocate.h"
#include "v2/allocate.h"

#include "hashtable_v2.h"
#include "v2/hashtable.h"
#include "log.h"
#include "manage_v2.h"
#include "v2/manage.h"
#include "options.h"
#include "retrieve.h"
#include "trace.h"
Expand Down
4 changes: 2 additions & 2 deletions pkg/noun/allocate_v2.h → pkg/noun/v2/allocate.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef U3_ALLOCATE_V2_H
#define U3_ALLOCATE_V2_H

#include "allocate.h"
#include "../allocate.h"

#include "manage_v2.h"
#include "v2/manage.h"
#include "options.h"

/** Aliases.
Expand Down
12 changes: 6 additions & 6 deletions pkg/noun/hashtable_v2.c → pkg/noun/v2/hashtable.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// @file

#include "hashtable.h"
#include "hashtable_v1.h"
#include "hashtable_v2.h"
#include "../hashtable.h"
#include "v1/hashtable.h"
#include "v2/hashtable.h"

#include "allocate.h"
#include "allocate_v1.h"
#include "allocate_v2.h"
#include "../allocate.h"
#include "v1/allocate.h"
#include "v2/allocate.h"

/* _ch_v2_popcount(): number of bits set in word. A standard intrinsic.
** NB: copy of _ch_v2_popcount in pkg/noun/hashtable.c
Expand Down
2 changes: 1 addition & 1 deletion pkg/noun/hashtable_v2.h → pkg/noun/v2/hashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define u3h_v2_walk u3h_walk
#define u3h_v2_walk_with u3h_walk_with

#include "hashtable.h"
#include "../hashtable.h"

#include "c3/c3.h"
#include "types.h"
Expand Down
16 changes: 8 additions & 8 deletions pkg/noun/jets_v2.c → pkg/noun/v2/jets.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/// @file

#include "vortex.h"
#include "../vortex.h"

#include "jets.h"
#include "jets_v2.h"
#include "../jets.h"
#include "v2/jets.h"

#include "allocate_v2.h"
#include "hashtable_v2.h"
#include "vortex_v2.h"
#include "v2/allocate.h"
#include "v2/hashtable.h"
#include "v2/vortex.h"

#include "hashtable_v3.h"
#include "jets_v3.h"
#include "v3/hashtable.h"
#include "v3/jets.h"

/* u3j_v2_reclaim(): clear ad-hoc persistent caches to reclaim memory.
*/
Expand Down
4 changes: 2 additions & 2 deletions pkg/noun/jets_v2.h → pkg/noun/v2/jets.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#ifndef U3_JETS_V2_H
#define U3_JETS_V2_H

#include "allocate.h"
#include "jets.h"
#include "../allocate.h"
#include "../jets.h"


/** Aliases.
Expand Down
22 changes: 11 additions & 11 deletions pkg/noun/manage_v2.c → pkg/noun/v2/manage.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/// @file

#include "manage_v2.h"

#include "allocate_v1.h"
#include "allocate_v2.h"
#include "hashtable_v2.h"
#include "jets_v2.h"
#include "nock_v2.h"
#include "options_v2.h"
#include "vortex.h"
#include "vortex_v1.h"
#include "vortex_v2.h"
#include "v2/manage.h"

#include "v1/allocate.h"
#include "v2/allocate.h"
#include "v2/hashtable.h"
#include "v2/jets.h"
#include "v2/nock.h"
#include "v2/options.h"
#include "../vortex.h"
#include "v1/vortex.h"
#include "v2/vortex.h"

/* _cm_pack_rewrite(): trace through arena, rewriting pointers.
*/
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions pkg/noun/nock_v2.c → pkg/noun/v2/nock.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/// @file

#include "nock_v2.h"
#include "v2/nock.h"

#include "vortex.h"
#include "../vortex.h"

#include "allocate_v2.h"
#include "hashtable_v2.h"
#include "vortex_v2.h"
#include "v2/allocate.h"
#include "v2/hashtable.h"
#include "v2/vortex.h"

#include "hashtable_v3.h"
#include "v3/hashtable.h"

/* u3n_v2_reclaim(): clear ad-hoc persistent caches to reclaim memory.
*/
Expand Down
Loading

0 comments on commit 4144e07

Please sign in to comment.