aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--src/aup.h2
-rw-r--r--src/compile.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 25a4b7b..d1b1dca 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ CC ?= cc
CFLAGS ?= -O2 -g
CFLAGS += -std=c17 -Wall -Wextra -Wpedantic -Werror
BUILD ?= build
-# The Pure checkout that owns module format v1; tests load every module with it.
+# The Pure checkout that owns the module format; tests load every module with it.
PURE ?= ../pure/prototypes/connections
.PHONY: all check
diff --git a/src/aup.h b/src/aup.h
index aa48daf..75047af 100644
--- a/src/aup.h
+++ b/src/aup.h
@@ -3,7 +3,7 @@
#include <stdbool.h>
#include <stddef.h>
-/* aup v0a: source text to a Pure module v1 (Pure docs/design/008). */
+/* aup: source text to a Pure module (Pure docs/design/008-module-format.md). */
enum { AUP_SOURCE_LIMIT = 32768, AUP_MESSAGE = 160 };
typedef struct {
diff --git a/src/compile.c b/src/compile.c
index e95d16c..340e623 100644
--- a/src/compile.c
+++ b/src/compile.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <string.h>
-/* Limits and opcodes of Pure module format v3. */
+/* Limits and opcodes of Pure module format v4. */
enum { STATES = 32, INPUTS = 32, VIEWS = 24, HANDLERS = 64, CODE = 512, STACK = 64, NAME = 32,
DEPTH = 64, FIELDS = 32, COLLECTIONS = 1, CONSTANTS = 64, CONSTANT_BYTES = 8192 };
enum { CONST, LOAD, DT, ADD, SUB, MUL, DIV, NEG, LT, LE, GT, GE, EQ, NE, AND, OR, NOT,
@@ -1175,7 +1175,7 @@ static void generate(Compiler *c, unsigned char **module, size_t *size) {
*size = 40 + 16u * c->states + 12u * c->collections + 16u * c->input_count + 8u * fields + 8u * c->constants +
16u * c->views + 12u * c->handler_count + 16u * c->code_count + used + c->constant_used;
unsigned char *p = *module = allocate(c, *size);
- memcpy(p, "PUREMOD3", 8);
+ memcpy(p, "PUREMOD4", 8);
put16(p + 8, c->states);
put16(p + 10, c->input_count);
put16(p + 12, c->views);