| Age | Commit message (Collapse) | Author |
|
EXTERN_FUNCTION may now return a C-struct record by value, either through
caller-supplied sret memory or as a coerced value stored back into the
record, as clang arranges it. This removes the last by-value rejection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
EXTERN parameters may now be C-struct records by value. clang's
arrangement decides the passing: coerced through memory, flattened
into elements, or indirect as byval or a pointer to a copy. Returning a
record by value stays rejected for now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Every EXTERN "C" signature is now arranged by clang's CodeGen
(arrangeFreeFunctionCall) for the host triple and applied by one generic
lowering routine, replacing the hand-written signext/zeroext rule.
clangCodeGen is linked statically into CPSCodeGen. Records still cross
only through pointer types, so generated code is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Pointer types to C-struct records now pass unchanged as variadic EXTERN
arguments. Pseudocode values still need a cast to a C type, and records
by value stay rejected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
A TYPE record whose fields are all C types, C structs or pointer types to
C structs now crosses the EXTERN "C" boundary through a pointer type.
Records by value are rejected for now, and a pointer to a record with a
non-C field names that field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
find_program returns C:/Windows/System32/cmd.exe, and cmd scans its
whole command line for switches, so it read "/cmd.exe" as /c and ran
"md.exe /d ..." instead of install.cmd, failing with "The syntax of the
command is incorrect."
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Replace bundle/scripts/smoke-package.py with smoke-package.pl, which uses
only core modules like the other build and test scripts. Windows runs it
with native Strawberry Perl.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Describe install.cmd in place of install.ps1: how to run it from the ZIP
or a build tree, its options and limits, the PowerShell-only shortcut,
the user PATH update and what CI verifies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
The smoke tests only checked that each package contained its installer.
Linux and macOS now run install.sh into a temporary prefix. Windows runs
install.cmd twice into a prefix with spaces, checks the shortcut and the
user PATH (no duplicate entry), and runs cmake --install on the build
tree. Each platform then runs the installed compiler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
The Windows ZIP now ships install.cmd, rewritten to CRLF by
configure_file so the package is right on any build host. The CMake
install target runs it through "cmd /d /c call", and install.cmd
replaces install.ps1 in the version input paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Many Windows machines block PowerShell scripts, but cmd is practically
always available. install.cmd copies the package into a per-user prefix
and adds it to the user PATH with reg; only the Start Menu shortcut uses
a single powershell -Command call, and a failure there just warns.
.gitattributes keeps *.cmd in CRLF because cmd misreads LF batch files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
|
|
ParserTemplate.cc
Pure move of isTemplatePack, ParseTemplateDecl and ParseTemplateArgs out
of ParserType.cc; no behavior change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
|
Pure move of both marshalCallArgs overloads, emitVariadicArgument and
resolveCall out of CodeGen.cc; no behavior change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
|
ParseFunctionBody() scopes the prototype's pack parameters, parses the
body up to ENDFUNCTION/ENDPROCEDURE, reports the same "expected ..."
diagnostic and builds the FunctionDefAST for both declaration forms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Add ParseOptionalCallArgs() for member calls and NEW, diagnoseResultAccess()
for the duplicated "access on a function result" diagnostic, and
isBuiltinTypeToken() for the builtin type keyword list used by template-call
lookahead, cast detection and CASE label scanning.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
INPUT targets and identifier expressions now build their legacy
VariableExprAST/ArrayAccessExprAST/DesignatorExprAST node through
makeDesignator(). INPUT still sets the target line explicitly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Move the self-contained arms of ParseStatementImpl into
ParseIncludeOrGlobal, ParseDeleteStmt, ParseInputStmt and
ParseOutputStmt without changing their bodies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
ParseOperatorName() takes an optional int * so callers that ignore the
operator token no longer declare a dummy. The identical identifier-or-
OPERATOR prologues of assignment, identifier-expression and CALL parsing
move into ParseCalleeName().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
getNextToken() now returns void since no caller reads its result, and
GetTokPrecedence() does a single map lookup without the unreachable
non-positive precedence check. Unused <cstdio>, <set> and FunctionAST.h
includes are dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
PathRunner.cc holds the lli lookup, LLVM 23 version check and lli
execution, and is built only with CPSC_RUN_MODE=PATH like
EmbeddedRunner.cc is for EMBEDDED.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Move the stages of main() into file-local functions without changing
diagnostics, exit codes or output files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
__cps_file_read and __cps_file_eof both emitted the same mode load,
comparison and ErrNotRead check after the slot lookup; emit it through
FileHandler::emitRequireReadMode instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
importCType is only called from TypeSystem's own methods. declareUserType
now sets IsClass through the entry registerType returns instead of looking
the name up again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
TypeCheckGen's private opToText duplicated cps::operatorSpelling; both
produce the same text for every binary operator the parser accepts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Drop the unused TypeInfo::isNumeric, pass emitCheck's format arguments
straight to emitStderr, remove unused <cctype>/<cstdio> includes and
turn always-true trailing operator tests in ArithmeticHandler into plain
returns.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Move the self-contained FunctionDef, INPUT, OUTPUT and READFILE branches
of emitStmtImpl into private emitFunctionDefStmt, emitInputStmt,
emitOutputStmt and emitReadFileStmt methods. The dispatch order and the
branch bodies are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
emitLValue (variable and designator base) and plain assignment repeated
the same lookup, enum-or-unknown diagnostic and requireWritable check.
Move it into a private lookupWritableSymbol helper. READFILE keeps its
own lookup, which has no enum diagnostic.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
copyClassValue, emitConstruct and emitStringFromCString each walked the
record fields and default-constructed those that need it. Move the loop
into a private emitFieldDefaults helper; each caller passes the same line
as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
EOF, OPENFILE, READFILE and CLOSEFILE each rejected a whole-array filename
and then emitted it as a C string. Route them through a private
emitFileNameOperand helper; diagnostics are unchanged. WRITEFILE keeps its
own combined check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
DECLARE and array-parameter binding both computed the dimension
multipliers, filled the same ArrayMetadata and stored it in ArrayTable.
Move that into a private ArrayHandler::defineMetadata helper that also
yields the total element count.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Move the copy-constructor, operator, MAIN OVERLOAD and reserved, builtin,
enum and type name checks at the start of emitPrototype into a private
validatePrototype helper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Make getLLVMType and the link-name emitCall overload private, inline the
single-use GenerateCall helper into that overload, and drop the argument
setName calls in createArgumentAllocas that repeat the names emitPrototype
already assigned. The undefined-function diagnostic stays: a link name can
be shadowed by another module global (e.g. FUNCTION stderr).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Drop the never-read StackObject::IsCopy flag and registerStackObject
parameter, the unused NewExprAST forward declaration, the unused Ret
parameter of FunctionGen::emitReturn and CG parameter of
ArrayHandler::loadElement, unused <cstdio> includes, and the
coerceValueToType early returns already covered by the exact LLVM type
check (builtin kinds always map to double/i64/i1/i8).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|