aboutsummaryrefslogtreecommitdiff
path: root/AGENTS/CONVENTIONS
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-21 12:49:21 +0000
committer_ov4 <ov4@ov4.org>2026-10-21 12:49:21 +0000
commitbb1244aaef910579d829eb1563365479860ae7e1 (patch)
tree6e8a95fcbb3942907f5d7229b16a65d1e08dd462 /AGENTS/CONVENTIONS
parent97f743a41925e4346aa2c08f23ba432072318eca (diff)
docs(agents): collapse duplicated passages into single-home links
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS/CONVENTIONS')
-rw-r--r--AGENTS/CONVENTIONS/CALLS.md12
-rw-r--r--AGENTS/CONVENTIONS/EXCEPTIONS_AND_UNITS.md2
-rw-r--r--AGENTS/CONVENTIONS/TYPES.md14
3 files changed, 12 insertions, 16 deletions
diff --git a/AGENTS/CONVENTIONS/CALLS.md b/AGENTS/CONVENTIONS/CALLS.md
index 261b06f..1942ded 100644
--- a/AGENTS/CONVENTIONS/CALLS.md
+++ b/AGENTS/CONVENTIONS/CALLS.md
@@ -23,13 +23,13 @@ bridge C void* and nominal pseudocode pointer types.
invoke a same-class BYREF OVERLOAD NEW when defined; STRING-bearing aggregates
clone their owned fields. Other classes without a copy constructor copy bits; class
rvalues transfer ownership. Other values use `emitCoercedExpr`.
-- Top-level prototypes are pre-registered (after the TYPE pre-pass) before statement
- emission, so call-before-definition is fine; a call with no registered signature is
- a compile error. Method prototypes are pre-registered too.
+- Top-level prototypes are pre-registered at the start of `compile()` (after the TYPE
+ pre-pass) before statement emission, so call-before-definition is fine; a call with
+ no registered signature is a compile error (no extern is fabricated). Method
+ prototypes are pre-registered too.
- OVERLOAD signatures append canonical parameter types to the link name; ordinary
- names except MAIN get no mangling. `getOverloads` filters by visibility and
- `resolveCall` selects exact static types/ranks. Return types, modes and bounds
- never distinguish overloads.
+ names except MAIN get no mangling. Overload sets, visibility filtering and exact
+ selection: [SUBSYSTEMS/FUNCTIONS.md](../SUBSYSTEMS/FUNCTIONS.md#signatures-and-call-resolution).
- In all cases, `emitPrototype` rejects names that collide with runtime/libc symbols
(`isReservedRuntimeName`), builtins, or enum values. Signatures retain the first
declaration spelling for LLVM lookup, independently of call-site casing.
diff --git a/AGENTS/CONVENTIONS/EXCEPTIONS_AND_UNITS.md b/AGENTS/CONVENTIONS/EXCEPTIONS_AND_UNITS.md
index 023354d..deed7ec 100644
--- a/AGENTS/CONVENTIONS/EXCEPTIONS_AND_UNITS.md
+++ b/AGENTS/CONVENTIONS/EXCEPTIONS_AND_UNITS.md
@@ -14,7 +14,7 @@ Part of [Load-bearing conventions](../CONVENTIONS.md).
- `RuntimeCheck::emitCheck` prints the source line and error reason to stderr before
throwing. Generated main catches anything unhandled, prints the generic termination
message to stderr, and returns 1. Explicit bare THROW prints no diagnostic itself.
-- Arrays in TRY and CATCH use separate block scopes; scalars retain existing function
+- Arrays in TRY and CATCH use separate block scopes; scalars keep function
scope.
**Compilation units and entry points.**
diff --git a/AGENTS/CONVENTIONS/TYPES.md b/AGENTS/CONVENTIONS/TYPES.md
index ff6ddf8..664782e 100644
--- a/AGENTS/CONVENTIONS/TYPES.md
+++ b/AGENTS/CONVENTIONS/TYPES.md
@@ -9,11 +9,9 @@ resolves the string to `TypeInfo{LLVMType, Kind, per-kind payload}`. The parser'
outside a RETURNS clause via its `AllowVoid` flag); other unknown types only fail
(softly) in CodeGen.
-**Fixed IR representation per builtin type.** INTEGER = `i64`, REAL = `double`,
-BOOLEAN = `i1`, CHAR = `i8`. STRING is the ordinary standard-library class
-`%record.STRING`, not a builtin pointer type. C_STRING remains a raw NUL-terminated C
-pointer. Some arithmetic code still infers types backwards from LLVM widths;
-preserve the builtin scalar ABI.
+**Fixed IR representation per builtin type.** The table lives in
+[ARCH/OVERVIEW.md](../ARCH/OVERVIEW.md). Some arithmetic code still infers types
+backwards from LLVM widths; preserve the builtin scalar ABI.
**C aliases are structural within the C domain.** `CIdentity` retains the canonical
C base type and pointer levels independently of the alias `Name`. Use `sameType`
@@ -42,7 +40,5 @@ and handles C/user kinds before builtin arithmetic. `coerceValueToType` hard-err
(not `Symbols`, so they survive FunctionGen's save/clear/restore). Expression
resolution order is `Symbols` first, then enum constants; collisions with
DECLARE/array/parameter/function names are compile errors at declaration time, so
-the order can never shadow. TYPE declarations are top-level only, registered by
-`compile()`'s two-pass pre-scan (names first — pointer pointees may
-forward-reference; definitions second, in source order — a by-value record field
-requires its record type to be already complete).
+the order can never shadow. TYPE declarations are top-level only and registered in
+two passes; see [SUBSYSTEMS/USER_TYPES.md](../SUBSYSTEMS/USER_TYPES.md#registration).