Agent/stabilize foundation - #10
Open
FuryBaM wants to merge 295 commits into
Open
Conversation
Реализован API AbsoluteVirtualModuleTableV1 и интеграция виртуальных модулей в загрузчик и реестр плагинов. Расширен AbsoluteLanguagePluginV1, добавлены структуры для semantic context, типов и владения ресурсами. Введены функции регистрации и поиска виртуальных модулей. Добавлены юнит- и интеграционные тесты для новых возможностей. В TODO.md отмечено выполнение задач по semantic API и переходу на виртуальные модули.
Расширен plugin_api.h: новые виды артефактов, backend и build graph API, структура AbsoluteCacheKeyV1. В Absolute-Compiler.cpp реализована интеграция виртуальных модулей плагинов. В math_plugin.cpp зарегистрирован пример виртуального модуля и экспортированы новые функции для интеграции. Добавлен юнит-тест для новых структур и обновлён интеграционный тест с использованием виртуального модуля. В TODO.md отмечены завершённые задачи по этим изменениям.
В Absolute-Compiler.cpp реализован вывод времени сборки исполняемого файла. В plugin_api.h расширен API: добавлены структуры для IDE, отладчика, политики разрешений и режимы изоляции. В run-desktop.ps1 добавлена инициализация среды Visual Studio, сборка и подключение Absolute-Math-Plugin. В plugin_api_unit_tests.cpp добавлен тест для новых структур API (P3).
Реализованы структуры и функции AbsoluteEditorPluginV1 для поддержки IDE/Debugger API (inlay hints, outline, folding, virtual documents, debug adapter и др.). В plugin_loader внедрена политика разрешений: загрузка плагинов теперь проверяет permissions из манифеста. Добавлены методы управления разрешениями, режимами изоляции, выгрузкой/перезагрузкой плагинов. В math_plugin реализован и экспортируется EditorPlugin с IDE/Debugger-хуками. В CMake и unit-тестах добавлены проверки enforcement разрешений и интеграционные тесты для новых возможностей. Обновлён TODO.md.
Реализованы кроссплатформенные C++-обёртки и abs-модули для работы с переменными окружения и процессом (PID, аргументы, запуск команд, cwd, hostname). Добавлены тесты и интеграция в сборку/CI. Обновлены CMake и список системных библиотек для Windows.
Реализованы структуры Date, Time, DateTime, TimeZone и функции для работы с календарными датами, временем, часовыми поясами, преобразованиями между Unix-временем и календарными представлениями, форматированием и парсингом ISO-8601. Добавлены низкоуровневые C++-функции и интерфейс для Absolute. Включены тесты и обновлён TODO.md.
Реализован модуль std.string (std.text) с поддержкой StringBuilder, Unicode (UTF-8) операций: подсчёт и получение кодовых точек, преобразование регистра (ASCII и кириллица), trim/startsWith/endsWith/contains, indexOf/lastIndexOf, replace, substring, join. Добавлены тесты и интеграция в сборку. Обновлён TODO.md.
Реализована поддержка интерполяции строк с десахариванием в format(...) на этапе парсинга. Метод ParseStringLiteralExpr теперь возвращает Expression и разбирает выражения внутри строк. Добавлены тесты и обновлена документация (TODO.md).
Добавлены модули json.cpp и binary.cpp с поддержкой сериализации/десериализации через FFI-интерфейсы для Absolute. Включены классы-обёртки и тесты std-json.abs и std-binary.abs. Обновлён CMake и TODO.md.
Реализована поддержка UDP-сокетов (создание, отправка, приём, закрытие), DNS-резолвинг, парсер и кодирование URI, а также HTTP-клиент и сервер. Добавлены соответствующие классы и функции в std.net, std.uri и std.http. Включены тесты для новых возможностей и обновлён CMake для их сборки и запуска. Обновлён TODO.md.
Внесены изменения в http.abs, net.abs, uri.abs и std-http.abs: - HttpRequest теперь с параметрами конструктора. - get → fetch, добавлены повторные попытки подключения. - HttpContext использует raw-указатели, реализован dispose. - В accept ручной парсинг запроса и работа с raw-сокетами. - В net.abs добавлен getHandle. - В std-http.abs обновлён main, добавлен doFetch, удалён handleOneRequest. - Импорт string.abs в uri.abs.
…ramework - Updated network functions to return durable copies of received strings, ensuring they outlive subsequent calls. - Introduced a `DurableCopy` utility for creating durable string copies in `string.cpp`. - Added `std.assert` module for soft assertions that throw `AssertionError` without aborting the process. - Implemented `std.log` for leveled logging with configurable minimum levels. - Created `std.testing` for a lightweight test suite runner utilizing soft assertions. - Enhanced `std.http` to improve request handling and response parsing. - Added tests for collection algorithms, logging, assertions, and the testing framework. - Updated CMake configuration to include new tests and ensure proper build setup.
feat: implement language server functionalities in language.js feat: add LSP server implementation in lsp-server.js build: add absolute-dev CLI tools for formatting, testing, documentation, and package management fix: create batch script for absolute-dev CLI on Windows
- Updated README to clarify release presets for WSL and native Windows. - Marked tasks in TODO as completed for debugger visualization, breakpoints, and REPL. - Added commands for opening opaque blocks and evaluating expressions in the Absolute extension. - Introduced visualizers for native debugging in Visual Studio and GDB. - Implemented a REPL and expression evaluator in tools for interactive coding. - Enhanced language server with support for opaque source mapping and evaluation requests. - Documented debugging features and REPL usage in new debugging.md. - Updated Windows build instructions to emphasize Ninja generator and MSVC environment setup. - Improved shader plugin documentation for opaque blocks and virtual document handling.
…structs, classes, and arrays
…hance error handling
…, including tests and documentation
…work stubs for WebAssembly
…d sockets and echo server
…er pool integration
…andling, and service tests
…egration - Implemented browser host mocks for HTTP and TCP in tools/absolute-wasm-browser-host.js and .mjs. - Added optional wasi-sysroot bootstrap script for Windows to facilitate libc experiments. - Updated documentation to reflect changes in WASM target capabilities and browser integration. - Introduced new CMake file for discovering wasi-sysroot paths. - Enhanced examples and tests to utilize new browser host features and mock functionalities. - Improved logging and error handling in the browser host environment.
- Implemented a static file server (scripts/serve-wasm-demo.mjs) to serve WASM demos with necessary cross-origin policies for SharedArrayBuffer. - Created a CMake script (tests/run-wasm-browser-session.cmake) to build and run a browser session for testing WASM modules. - Developed a main-thread client (tools/absolute-wasm-browser-session-client.js) for managing WASM sessions and handling logs. - Introduced a worker script (tools/absolute-wasm-browser-session-worker.js) to run WASM modules off the UI thread, supporting TCP operations. - Added a WebSocket-backed TCP worker (tools/absolute-wasm-ws-tcp-worker.js) to facilitate communication over WebSockets for nested workers.
…adoptRaw, retainRaw, borrowRaw, share, Control Block)
…ction E_MANAGED_OWNERSHIP_CYCLE, thread-safe slots, typed capsule deleter)
…erRole taxonomy (ValueCategory, PlaceInfo, PointerRole, E_REF_MOVE, E_REF_DELETE)
…mantics in Absolute
… to functions and fields
…, MemoryStream, BufferedReader, BufferedWriter with 100% CTest pass
…mark runner Explicitly specialized generic calls rejected the implicit numeric conversions that ordinary overloads accept: SelectOverload seeded the substitution map from the explicit type arguments and then unified those same parameters against the argument types, so identity<int64>(7) failed with "no overload of 'identity' accepts (int32)" even though the non-generic int64 twice(int64) accepts the same literal. Explicit type arguments already bind every generic parameter, so skip unification in that case and let ConversionCost judge the arguments, exactly as it does for a non-generic candidate. Invalid calls are still rejected. The X11 desktop runtime declared a helper named KeyCode, which is ambiguous with the KeyCode typedef from X11/X.h and broke the Linux build whenever the X11 backend was selected. Rename it to MapKeyCode. Add benchmarks/run-benchmarks.py, a POSIX driver for the array, pointer-object, algorithm, collection, and value-ref suites. The existing run.bat/run-benchmark.ps1 drivers need MSVC and a WSL hop for the Absolute side, so none of the suites could run on Linux. The runner reproduces the same methodology: Absolute through absolutec --emit-llvm optimized by clang -O3 -march=native, checksum validation before a time is accepted, rotating language order, medians for optimized languages and separate Python sampling. Toolchains that are absent are skipped with a note instead of aborting the run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPqntJmyXNSmZNzuQWj5QS
Running the suites on Linux leaves extension-less native executables in collection-suite/.benchmark-build/native/ and timestamped result files, neither of which belongs in the repository. The suite already tracks its Windows .exe/.obj/.ll/.class artifacts, so ignore that directory with negations that keep those visible, and ignore Linux result files by name across every suite. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPqntJmyXNSmZNzuQWj5QS
An unqualified call inside an interface default method body reached the implicit-this path, which only searched classes and structs. The interface matched neither, so every such call failed codegen with "missing implicit instance method". A default body could therefore only use its parameters and statics, not the contract it belongs to. Look the method up in the interface as well and dispatch it through the vtable the object carries, so the call lands on the concrete implementation and a class override still wins over the default it replaces. Ordinary functions use their source name as the link name, so an Absolute function named after a C runtime entry point took over that symbol. The generated code and the Absolute runtime both call into those, so allocation started running user code: a program defining free(C*) printed the right answer and then aborted in managed cleanup, and one defining malloc corrupted itself before reaching main. Give such a definition a link name outside the C namespace. Parameter types alone are not enough because a zero-argument abort() still mangles to a bare abort, so the private name carries a leading dot, which no C identifier can have. extern, export "C", and main keep owning their symbols deliberately and are untouched, and every other function keeps the name it had. Both cases are covered by tests that fail without these changes: the interface build fails outright, and base-language segfaults. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPqntJmyXNSmZNzuQWj5QS
…ct arrays ConsumeTemplateClose split the `>>` that closes a nested argument list by inserting a token into `tokens`. That vector backs every Token* the parser holds, including ones live across the call, so the insert reallocated it and left them dangling: Pair<Pair<int32>> crashed the compiler with a segfault or bad_alloc and no diagnostic, while the same code with `> >` compiled. Split the token in place instead, leaving the vector's size alone: the call takes the first '>' and the token keeps the second for the enclosing list. Lambda captures named a parameter's symbol, but the analyzer never recorded an ExpressionInfo for the parameter declaration, so code generation mapped it to InvalidSymbolId and no capture could resolve to its storage. A lambda could close over a local but not over the enclosing function's parameters. Record the declaration when the parameter symbol is declared. Integer division by zero is undefined behavior in LLVM, so an unchecked sdiv let the program keep running on whatever the optimizer produced: the same expression printed a different garbage value on each run and exited successfully. Reject a divisor that is provably zero at compile time, and check the rest at runtime the way an array index is checked. Measured on the algorithm suite, the check costs nothing: gcd, the division-heavy case, is unchanged. A sized declarator was only recognized after a primitive type name, so `Point pts[3]` parsed as an inline value declaration and gave the variable the element type; indexing it then reported that a Point is not an array. Treat a sized declarator on the name as an array declaration for a user-defined element type too. Heap arrays of the same type already worked. Each fix has a test that fails without it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPqntJmyXNSmZNzuQWj5QS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.