[pull] master from GaijinEntertainment:master#966
Merged
Conversation
Now we can reuse visitor to just visit one node, not recursively. It will be used in following commit to extract serialize from Expression.
Ast should not know anything about serialization. Now serializer is separate visitor declared in src/builtin/module_builtin_ast_serialize.cpp
We need to skip expected failures in serialization. To do so their naming should be unified.
Fix module leaks. Now this all memory ownership is confusing and error-prone. To supress leak we should manually release module.
Fixes three related gaps when an intermediate class/struct in the chain defines neither the constructor, the method being overridden, nor a finalizer. * `super()` constructor: rewritten in InferTypes::visit (post-visit), not preVisit, so argument types are populated. Walks up classParent->parent->... and matches by argument types. Previously crashed with SIGSEGV on `super(arg)` because preVisit fed null arg->type into findMatchingFunctions. * `super.method()` already had walk-up logic (visit ExprCall) but was missing this fix. * `delete super.self`: walks up selfStruct->parent looking for the nearest ancestor whose type resolves a user-defined `finalize`. Filters out auto-generated finalizers (generateStructureFinalizer / makeClassFinalize) via Function::generated, since they don't chain to ancestors. Previously cast unconditionally to the immediate parent, silently dropping ancestor finalizers when the parent was empty. Tests/language: 4 new skip-level cases for super/super.method in super.das and 4 new cases (1-empty, 2-empty, mid-chain, struct-skip) in super_finalize.das. classes.rst and structs.rst updated to describe the walk-up. 925/925 tests/language pass under both interpreter and AOT. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…empty super: walk up inheritance chain past empty intermediates
We should never use print() inside daslib/. And we should always prefer to_log everywhere, not only in daslib. Also made logs in serialize more clear.
Make ids unique and stable. Enable serialization in dastest and added to CI.
Feature/split serialize
Final piece of the migration trio (after 14a spine, 14b typed ALTER) - the rebuild path for schema changes SQLite's narrow ALTER vocabulary cannot express in place (PK/FK/CHECK changes, type narrowing). User-side surface collapses the SQLite 12-step recipe to three lines: keep the historical struct as [sql_table(legacy=true)], write a [struct_convert]-annotated converter, and call db |> convert_and_rename(type<S>, type<T>) from the migration body. Also: utils/hygiene gains a collapse-blank-lines rule chained after the private-docstring trim. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dasSQLITE chunk 14c: schema rebuild via [struct_convert]
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )