Phase 3f complete: Advanced Memory Management (Steps 64-67)

Step 64: AnnotationValidator — @Deallocate missing-intent, @Owner(Single) alias detection, parent/child conflict (5/5 tests)
Step 65: MemoryStrategyInference — language defaults, per-function pattern analysis, confidence scores (5/5 tests)
Step 66: CrossLanguageProjector — deep-copy AST projection, annotation-aware CppGenerator (shared_ptr/unique_ptr) (5/5 tests)
Step 67: Optimization annotations — HotCold, Inline, Pure, ConstExpr with C++ attribute generation (9/9 tests)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bill
2026-02-08 20:57:58 -07:00
parent 7fb9e89e25
commit 650e8557ae
9 changed files with 870 additions and 83 deletions

View File

@@ -23,16 +23,7 @@ static bool contains(const std::string& haystack, const std::string& needle) {
return haystack.find(needle) != std::string::npos;
}
// Forward declaration — CrossLanguageProjector
class CrossLanguageProjector {
public:
// Project an AST from source language to target language
// Returns a new AST with annotations adapted for the target
std::unique_ptr<Module> project(const Module* source, const std::string& targetLanguage) const;
// Check if all annotations survived the projection
bool annotationsPreserved(const Module* original, const Module* projected) const;
};
#include "CrossLanguageProjector.h"
int main() {
int passed = 0;