Merge pull request #51 from abdussamedulutas/0.1.0
fix(ast,dce): #35 bellek sızıntısı + #36 W003 uyarısı + refactor toJson
This commit is contained in:
commit
326a8d8950
25
CLAUDE.md
25
CLAUDE.md
|
|
@ -37,13 +37,24 @@ git'te izlenir.
|
|||
değil; kripto asla elle yazılmaz (ADR-017).
|
||||
|
||||
## Mevcut durum (yapılan vs planlanan)
|
||||
- **Çalışıyor:** lexer, tokenizer, Pratt parser, AST, AST'nin JSON serileştirmesi,
|
||||
CLI iskeleti (`tokens`/`ast`/`symbols`/`run`), konum takibi, basit aritmetiği
|
||||
düşüren minimal IR deneyi.
|
||||
- **Planlı (henüz YOK):** sembol tablosu, semantik analiz, tip sistemi, diagnostic
|
||||
motoru, optimizasyon, IR+bytecode VM ile çalıştırma.
|
||||
- **Birinci kilometre taşı ("bitti" tanımı):** `examples/fibonacci.sqt`
|
||||
(recursive + iterative) derlenip çalıştırılabilmeli.
|
||||
- **✅ Birinci kilometre taşı AŞILDI:** `examples/fibonacci.sqt`
|
||||
(recursive + iterative) `saqut run` ile çalışıyor → `55\n55`.
|
||||
- **Çalışıyor (tam pipeline):**
|
||||
- Lexer, tokenizer, Pratt parser, AST + JSON serileştirmesi
|
||||
- Sembol tablosu (iki-geçişli toplayıcı, döngüsel struct tespiti)
|
||||
- Tip sistemi (`src/core/type.hpp`) + diagnostic motoru (`src/diagnostic/`)
|
||||
- Tip denetleyici + yapısal doğrulayıcı (`src/semantic/`)
|
||||
- Optimizasyon: constant folding (int/bool/logical) + dead code elimination
|
||||
- IR üreteci (3-adresli, slot tabanlı) + bytecode VM (yorumlayıcı döngü)
|
||||
- CLI: `tokens` / `ast` / `symbols` / `check` / `ir` / `run` (6 komut)
|
||||
- **Henüz YOK (bilinen eksikler):**
|
||||
- float/double codegen (tip sistemi var, IR opcode'u yok)
|
||||
- struct IR (parse/semantik var, codegen yok)
|
||||
- array IR (parse/semantik var, codegen yok)
|
||||
- `%=` operatörü IR'da eksik (#37)
|
||||
- Global değişken IR üretimi sessizce atlıyor (#38)
|
||||
- W003 ölü kod uyarısı üretilmiyor (#36)
|
||||
- DCE silinen düğümleri `delete` etmiyor — bellek sızıntısı (#35)
|
||||
- **İlke:** Önce uçtan uca tek **dikey dilim**, sonra çerçeve. Erken soyutlamadan kaçın.
|
||||
|
||||
## Belge haritası
|
||||
|
|
|
|||
|
|
@ -20,3 +20,99 @@ file(GLOB_RECURSE SOURCES "src/*.cpp")
|
|||
add_executable(saqut ${SOURCES})
|
||||
|
||||
target_include_directories(saqut PRIVATE src)
|
||||
|
||||
# ── Testler ──────────────────────────────────────────────────────────────────
|
||||
enable_testing()
|
||||
|
||||
set(SAQUT_BINARY "${CMAKE_BINARY_DIR}/saqut")
|
||||
set(GOLDEN_SCRIPT "${CMAKE_SOURCE_DIR}/cmake/run_golden.cmake")
|
||||
|
||||
# Birim testleri (tests/run.sh)
|
||||
add_test(
|
||||
NAME unit_tests
|
||||
COMMAND bash "${CMAKE_SOURCE_DIR}/tests/run.sh"
|
||||
)
|
||||
|
||||
# Golden testleri — tests/golden/**/*.sqt dosyalarını otomatik keşfet.
|
||||
# Her .sqt için iki olası expected dosyası kontrol edilir:
|
||||
# BASE.expected → saqut run (siyah-kutu çıktı testi)
|
||||
# BASE.ir_opt.expected → saqut ir --optimized (beyaz-kutu IR testi)
|
||||
file(GLOB_RECURSE ALL_GOLDEN_SQT CONFIGURE_DEPENDS
|
||||
"${CMAKE_SOURCE_DIR}/tests/golden/*.sqt"
|
||||
)
|
||||
foreach(SQT_FILE ${ALL_GOLDEN_SQT})
|
||||
file(RELATIVE_PATH REL "${CMAKE_SOURCE_DIR}/tests/golden" "${SQT_FILE}")
|
||||
string(REPLACE ".sqt" "" BASE "${REL}")
|
||||
string(REPLACE "/" "_" TNAME "${BASE}")
|
||||
|
||||
# Siyah-kutu: saqut run çıktısı
|
||||
set(RUN_EXPECTED "${CMAKE_SOURCE_DIR}/tests/golden/${BASE}.expected")
|
||||
if(EXISTS "${RUN_EXPECTED}")
|
||||
add_test(
|
||||
NAME "golden_${TNAME}"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBINARY=${SAQUT_BINARY}
|
||||
-DSOURCE=${SQT_FILE}
|
||||
-DEXPECTED=${RUN_EXPECTED}
|
||||
-P "${GOLDEN_SCRIPT}"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Beyaz-kutu: saqut ir --optimized çıktısı
|
||||
set(IR_OPT_EXPECTED "${CMAKE_SOURCE_DIR}/tests/golden/${BASE}.ir_opt.expected")
|
||||
if(EXISTS "${IR_OPT_EXPECTED}")
|
||||
add_test(
|
||||
NAME "golden_${TNAME}_ir_opt"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBINARY=${SAQUT_BINARY}
|
||||
-DSOURCE=${SQT_FILE}
|
||||
-DEXPECTED=${IR_OPT_EXPECTED}
|
||||
-DCOMMAND=ir
|
||||
-DOPTIMIZED=1
|
||||
-P "${GOLDEN_SCRIPT}"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Doğruluk kalkanı: saqut run --optimized çıktısı == beklenen golden değer
|
||||
# "Optimizasyon oldu" değil, "optimize IR doğru sonuç verdi" testleri.
|
||||
set(RUN_OPT_EXPECTED "${CMAKE_SOURCE_DIR}/tests/golden/${BASE}.run_opt.expected")
|
||||
if(EXISTS "${RUN_OPT_EXPECTED}")
|
||||
add_test(
|
||||
NAME "golden_${TNAME}_run_opt"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBINARY=${SAQUT_BINARY}
|
||||
-DSOURCE=${SQT_FILE}
|
||||
-DEXPECTED=${RUN_OPT_EXPECTED}
|
||||
-DOPTIMIZED=1
|
||||
-P "${GOLDEN_SCRIPT}"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Negatif test: .compile_error — derleme hatası beklenen golden testler.
|
||||
# Dosya içeriği stderr'de aranır (regex/düz dize).
|
||||
set(COMPILE_ERROR_EXPECTED "${CMAKE_SOURCE_DIR}/tests/golden/${BASE}.compile_error")
|
||||
if(EXISTS "${COMPILE_ERROR_EXPECTED}")
|
||||
add_test(
|
||||
NAME "golden_${TNAME}_compile_error"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBINARY=${SAQUT_BINARY}
|
||||
-DSOURCE=${SQT_FILE}
|
||||
-DEXPECTED=${COMPILE_ERROR_EXPECTED}
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/run_golden_error.cmake"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Negatif test: .runtime_error — çalışma zamanı hatası beklenen golden testler.
|
||||
# Aynı altyapı: exit code != 0 + stderr içeriği kontrolü.
|
||||
set(RUNTIME_ERROR_EXPECTED "${CMAKE_SOURCE_DIR}/tests/golden/${BASE}.runtime_error")
|
||||
if(EXISTS "${RUNTIME_ERROR_EXPECTED}")
|
||||
add_test(
|
||||
NAME "golden_${TNAME}_runtime_error"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DBINARY=${SAQUT_BINARY}
|
||||
-DSOURCE=${SQT_FILE}
|
||||
-DEXPECTED=${RUNTIME_ERROR_EXPECTED}
|
||||
-P "${CMAKE_SOURCE_DIR}/cmake/run_golden_error.cmake"
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,23 +1,34 @@
|
|||
# ninja log v7
|
||||
13 4576 1781796718440262330 CMakeFiles/saqut.dir/src/core/sourcefile.cpp.o 20f68631dd335029
|
||||
13 4805 1781796718441539505 CMakeFiles/saqut.dir/src/lexer/lexer.cpp.o 5fd259c0401f3e22
|
||||
1 2117 1781796771817437208 CMakeFiles/saqut.dir/src/tokenizer/tokenizer.cpp.o fbabe80dcb141239
|
||||
4580 9322 1781796723007277591 CMakeFiles/saqut.dir/src/parser/parser.cpp.o 59cdb5935c541b26
|
||||
21 6876 1781796718448262357 CMakeFiles/saqut.dir/src/parser/nodes/program.cpp.o 9313cba8d8daffed
|
||||
16 6700 1781796718443848488 CMakeFiles/saqut.dir/src/parser/nodes/identifier.cpp.o e3b5b38d75fcd2ca
|
||||
15 7814 1781796718443331391 CMakeFiles/saqut.dir/src/parser/nodes/expressions.cpp.o 5f5bb01381a3c3ad
|
||||
16 7589 1781796718444498682 CMakeFiles/saqut.dir/src/parser/nodes/literal.cpp.o 55743f37408c5f
|
||||
21 7502 1781796718449424977 CMakeFiles/saqut.dir/src/parser/nodes/statements.cpp.o 3c8869307381c930
|
||||
14 6864 1781796718442362341 CMakeFiles/saqut.dir/src/parser/nodes/binary_expr.cpp.o 5cc8b697133bcf64
|
||||
15 6733 1781796718442847556 CMakeFiles/saqut.dir/src/parser/nodes/declarations.cpp.o c3d262615ede4c95
|
||||
1 4629 1781801148234045650 CMakeFiles/saqut.dir/src/main.cpp.o 3cfef7a665d5bf87
|
||||
4629 4900 1781801152862380672 saqut f2e198803c4dbffb
|
||||
0 22 1781801180493522122 build.ninja 1876a59d627a585
|
||||
0 22 1781801180493522122 /home/saqut/Masaüstü/saqutcompiler/build/cmake_install.cmake 1876a59d627a585
|
||||
6733 11112 1781796725160284765 CMakeFiles/saqut.dir/src/symbol/symbol_collector.cpp.o ec4e483b8ddb4007
|
||||
4805 9685 1781796723232278341 CMakeFiles/saqut.dir/src/semantic/structural_validator.cpp.o 248faa3675024351
|
||||
6700 10405 1781796725127284655 CMakeFiles/saqut.dir/src/semantic/type_checker.cpp.o b29c133293d988b0
|
||||
1 850 1781801148235507662 CMakeFiles/saqut.dir/src/vm/interpreter.cpp.o b7dd80e002d68a1d
|
||||
2 957 1781800866770475511 CMakeFiles/saqut.dir/src/ir/ir_function.cpp.o 10f5e8dfd1461d69
|
||||
2 718 1781800866771246136 CMakeFiles/saqut.dir/src/ir/ir_program.cpp.o 9518231d970828da
|
||||
2 3169 1781800866771136888 CMakeFiles/saqut.dir/src/ir/ir_generator.cpp.o 10a1ed4e1f52e530
|
||||
1 9 1781900092189939762 /home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/cmake.verify_globs 1813c41e0f312d7e
|
||||
10 1691 1781900092199402809 CMakeFiles/saqut.dir/src/ir/ir_program.cpp.o d681b36458a6e5f5
|
||||
10 1957 1781900092199188672 CMakeFiles/saqut.dir/src/ir/ir_function.cpp.o 85cbc174284792d4
|
||||
10 5411 1781900092199511505 CMakeFiles/saqut.dir/src/lexer/lexer.cpp.o 90eeec811f2137e6
|
||||
10 5413 1781900092198939716 CMakeFiles/saqut.dir/src/core/sourcefile.cpp.o da6f5fc90e87e6b1
|
||||
10 6729 1781900092199847028 CMakeFiles/saqut.dir/src/parser/nodes/declarations.cpp.o b6c56f04a257f685
|
||||
15 7732 1781900092203939691 CMakeFiles/saqut.dir/src/parser/nodes/expressions.cpp.o 4057e3d63c63a1ab
|
||||
10 8908 1781900092199302769 CMakeFiles/saqut.dir/src/ir/ir_generator.cpp.o 84c9f816f969cfa7
|
||||
10 9701 1781900092199743167 CMakeFiles/saqut.dir/src/parser/nodes/binary_expr.cpp.o d2e2bb2f8a63c6d2
|
||||
1709 9770 1781900093898639567 CMakeFiles/saqut.dir/src/parser/nodes/literal.cpp.o 78f2c4da7c9b2281
|
||||
15 10364 1781900092204948414 CMakeFiles/saqut.dir/src/parser/nodes/identifier.cpp.o eb96bb4b1eb4ad80
|
||||
1957 11871 1781900094145929879 CMakeFiles/saqut.dir/src/parser/nodes/program.cpp.o ac5bbcd74d87561a
|
||||
9770 11899 1781900101958890478 CMakeFiles/saqut.dir/src/vm/interpreter.cpp.o 88078036625564ef
|
||||
5413 11959 1781900097601912436 CMakeFiles/saqut.dir/src/parser/parser.cpp.o 2c65b7be26cead32
|
||||
10 12284 1781900092199621706 CMakeFiles/saqut.dir/src/main.cpp.o 110c26cb1d0c3a23
|
||||
6729 13187 1781900098917905800 CMakeFiles/saqut.dir/src/semantic/structural_validator.cpp.o 4bfec8abc0e9893e
|
||||
5412 13356 1781900097601088348 CMakeFiles/saqut.dir/src/parser/nodes/statements.cpp.o b5c20724bbf3648c
|
||||
7733 14099 1781900099922227854 CMakeFiles/saqut.dir/src/semantic/type_checker.cpp.o 15f44776b9c3e26d
|
||||
9701 14179 1781900101889890826 CMakeFiles/saqut.dir/src/tokenizer/tokenizer.cpp.o a01677f8bb4f4dbc
|
||||
8908 14635 1781900101096894819 CMakeFiles/saqut.dir/src/symbol/symbol_collector.cpp.o 3348f498f369213d
|
||||
14635 14953 1781900106823866003 saqut 8f3d7184b374150b
|
||||
2 17 1781900144964675644 /home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/cmake.verify_globs 1813c41e0f312d7e
|
||||
18 4193 1781900144981580253 CMakeFiles/saqut.dir/src/semantic/structural_validator.cpp.o 4bfec8abc0e9893e
|
||||
18 4260 1781900144981478187 CMakeFiles/saqut.dir/src/parser/parser.cpp.o 2c65b7be26cead32
|
||||
18 4852 1781900144981695435 CMakeFiles/saqut.dir/src/semantic/type_checker.cpp.o 15f44776b9c3e26d
|
||||
18 4914 1781900144981374397 CMakeFiles/saqut.dir/src/parser/nodes/declarations.cpp.o b6c56f04a257f685
|
||||
18 5211 1781900144980675565 CMakeFiles/saqut.dir/src/ir/ir_generator.cpp.o 84c9f816f969cfa7
|
||||
18 5324 1781900144981813038 CMakeFiles/saqut.dir/src/symbol/symbol_collector.cpp.o 3348f498f369213d
|
||||
18 6912 1781900144981279910 CMakeFiles/saqut.dir/src/main.cpp.o 110c26cb1d0c3a23
|
||||
6912 7184 1781900151874641436 saqut 8f3d7184b374150b
|
||||
1 8 1781900314792856660 /home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/cmake.verify_globs 1813c41e0f312d7e
|
||||
9 4869 1781900314800856623 CMakeFiles/saqut.dir/src/main.cpp.o 110c26cb1d0c3a23
|
||||
4869 5168 1781900319660833784 saqut 8f3d7184b374150b
|
||||
|
|
|
|||
|
|
@ -1,4 +1,269 @@
|
|||
|
||||
---
|
||||
events:
|
||||
-
|
||||
kind: "message-v1"
|
||||
backtrace:
|
||||
- "/usr/share/cmake-3.28/Modules/CMakeDetermineSystem.cmake:233 (message)"
|
||||
- "CMakeLists.txt:2 (project)"
|
||||
message: |
|
||||
The system is: Linux - 6.18.5 - x86_64
|
||||
-
|
||||
kind: "message-v1"
|
||||
backtrace:
|
||||
- "/usr/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:17 (message)"
|
||||
- "/usr/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)"
|
||||
- "/usr/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake:126 (CMAKE_DETERMINE_COMPILER_ID)"
|
||||
- "CMakeLists.txt:2 (project)"
|
||||
message: |
|
||||
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
|
||||
Compiler: /usr/bin/c++
|
||||
Build flags:
|
||||
Id flags:
|
||||
|
||||
The output was:
|
||||
0
|
||||
|
||||
|
||||
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"
|
||||
|
||||
The CXX compiler identification is GNU, found in:
|
||||
/home/user/saqut/build/CMakeFiles/3.28.3/CompilerIdCXX/a.out
|
||||
|
||||
-
|
||||
kind: "try_compile-v1"
|
||||
backtrace:
|
||||
- "/usr/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)"
|
||||
- "/usr/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
|
||||
- "CMakeLists.txt:2 (project)"
|
||||
checks:
|
||||
- "Detecting CXX compiler ABI info"
|
||||
directories:
|
||||
source: "/home/user/saqut/build/CMakeFiles/CMakeScratch/TryCompile-6ljCUz"
|
||||
binary: "/home/user/saqut/build/CMakeFiles/CMakeScratch/TryCompile-6ljCUz"
|
||||
cmakeVariables:
|
||||
CMAKE_CXX_FLAGS: ""
|
||||
CMAKE_CXX_FLAGS_DEBUG: "-g"
|
||||
CMAKE_EXE_LINKER_FLAGS: ""
|
||||
buildResult:
|
||||
variable: "CMAKE_CXX_ABI_COMPILED"
|
||||
cached: true
|
||||
stdout: |
|
||||
Change Dir: '/home/user/saqut/build/CMakeFiles/CMakeScratch/TryCompile-6ljCUz'
|
||||
|
||||
Run Build Command(s): /usr/bin/ninja -v cmTC_b1346
|
||||
[1/2] /usr/bin/c++ -v -o CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/c++
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 13.3.0-6ubuntu2~24.04.1' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-13-EldibY/gcc-13-13.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-13-EldibY/gcc-13-13.3.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
|
||||
Thread model: posix
|
||||
Supported LTO compression algorithms: zlib zstd
|
||||
gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04.1)
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_b1346.dir/'
|
||||
/usr/libexec/gcc/x86_64-linux-gnu/13/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_b1346.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccKBrizP.s
|
||||
GNU C++17 (Ubuntu 13.3.0-6ubuntu2~24.04.1) version 13.3.0 (x86_64-linux-gnu)
|
||||
compiled by GNU C version 13.3.0, GMP version 6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.26-GMP
|
||||
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/13"
|
||||
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/13/include-fixed/x86_64-linux-gnu"
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/13/include-fixed"
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/13/../../../../x86_64-linux-gnu/include"
|
||||
#include "..." search starts here:
|
||||
#include <...> search starts here:
|
||||
/usr/include/c++/13
|
||||
/usr/include/x86_64-linux-gnu/c++/13
|
||||
/usr/include/c++/13/backward
|
||||
/usr/lib/gcc/x86_64-linux-gnu/13/include
|
||||
/usr/local/include
|
||||
/usr/include/x86_64-linux-gnu
|
||||
/usr/include
|
||||
End of search list.
|
||||
Compiler executable checksum: 7896445e4990772fdae9dc0659a99266
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_b1346.dir/'
|
||||
as -v --64 -o CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccKBrizP.s
|
||||
GNU assembler version 2.42 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.42
|
||||
COMPILER_PATH=/usr/libexec/gcc/x86_64-linux-gnu/13/:/usr/libexec/gcc/x86_64-linux-gnu/13/:/usr/libexec/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/13/:/usr/lib/gcc/x86_64-linux-gnu/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/13/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.'
|
||||
[2/2] : && /usr/bin/c++ -v CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_b1346 && :
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/c++
|
||||
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 13.3.0-6ubuntu2~24.04.1' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-13-EldibY/gcc-13-13.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-13-EldibY/gcc-13-13.3.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
|
||||
Thread model: posix
|
||||
Supported LTO compression algorithms: zlib zstd
|
||||
gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04.1)
|
||||
COMPILER_PATH=/usr/libexec/gcc/x86_64-linux-gnu/13/:/usr/libexec/gcc/x86_64-linux-gnu/13/:/usr/libexec/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/13/:/usr/lib/gcc/x86_64-linux-gnu/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/13/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_b1346' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_b1346.'
|
||||
/usr/libexec/gcc/x86_64-linux-gnu/13/collect2 -plugin /usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper -plugin-opt=-fresolution=/tmp/cci1AaX8.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_b1346 /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/13 -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/13/../../.. CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crtn.o
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_b1346' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_b1346.'
|
||||
|
||||
exitCode: 0
|
||||
-
|
||||
kind: "message-v1"
|
||||
backtrace:
|
||||
- "/usr/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:127 (message)"
|
||||
- "/usr/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
|
||||
- "CMakeLists.txt:2 (project)"
|
||||
message: |
|
||||
Parsed CXX implicit include dir info: rv=done
|
||||
found start of include info
|
||||
found start of implicit include info
|
||||
add: [/usr/include/c++/13]
|
||||
add: [/usr/include/x86_64-linux-gnu/c++/13]
|
||||
add: [/usr/include/c++/13/backward]
|
||||
add: [/usr/lib/gcc/x86_64-linux-gnu/13/include]
|
||||
add: [/usr/local/include]
|
||||
add: [/usr/include/x86_64-linux-gnu]
|
||||
add: [/usr/include]
|
||||
end of search list found
|
||||
collapse include dir [/usr/include/c++/13] ==> [/usr/include/c++/13]
|
||||
collapse include dir [/usr/include/x86_64-linux-gnu/c++/13] ==> [/usr/include/x86_64-linux-gnu/c++/13]
|
||||
collapse include dir [/usr/include/c++/13/backward] ==> [/usr/include/c++/13/backward]
|
||||
collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/13/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/13/include]
|
||||
collapse include dir [/usr/local/include] ==> [/usr/local/include]
|
||||
collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu]
|
||||
collapse include dir [/usr/include] ==> [/usr/include]
|
||||
implicit include dirs: [/usr/include/c++/13;/usr/include/x86_64-linux-gnu/c++/13;/usr/include/c++/13/backward;/usr/lib/gcc/x86_64-linux-gnu/13/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include]
|
||||
|
||||
|
||||
-
|
||||
kind: "message-v1"
|
||||
backtrace:
|
||||
- "/usr/share/cmake-3.28/Modules/CMakeDetermineCompilerABI.cmake:159 (message)"
|
||||
- "/usr/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)"
|
||||
- "CMakeLists.txt:2 (project)"
|
||||
message: |
|
||||
Parsed CXX implicit link information:
|
||||
link line regex: [^( *|.*[/\\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)]
|
||||
ignore line: [Change Dir: '/home/user/saqut/build/CMakeFiles/CMakeScratch/TryCompile-6ljCUz']
|
||||
ignore line: []
|
||||
ignore line: [Run Build Command(s): /usr/bin/ninja -v cmTC_b1346]
|
||||
ignore line: [[1/2] /usr/bin/c++ -v -o CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/c++]
|
||||
ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa]
|
||||
ignore line: [OFFLOAD_TARGET_DEFAULT=1]
|
||||
ignore line: [Target: x86_64-linux-gnu]
|
||||
ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 13.3.0-6ubuntu2~24.04.1' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c ada c++ go d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-13-EldibY/gcc-13-13.3.0/debian/tmp-nvptx/usr amdgcn-amdhsa=/build/gcc-13-EldibY/gcc-13-13.3.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [Supported LTO compression algorithms: zlib zstd]
|
||||
ignore line: [gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04.1) ]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_b1346.dir/']
|
||||
ignore line: [ /usr/libexec/gcc/x86_64-linux-gnu/13/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.28/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_b1346.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccKBrizP.s]
|
||||
ignore line: [GNU C++17 (Ubuntu 13.3.0-6ubuntu2~24.04.1) version 13.3.0 (x86_64-linux-gnu)]
|
||||
ignore line: [ compiled by GNU C version 13.3.0 GMP version 6.3.0 MPFR version 4.2.1 MPC version 1.3.1 isl version isl-0.26-GMP]
|
||||
ignore line: []
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/13"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/13/include-fixed/x86_64-linux-gnu"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/13/include-fixed"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/13/../../../../x86_64-linux-gnu/include"]
|
||||
ignore line: [#include "..." search starts here:]
|
||||
ignore line: [#include <...> search starts here:]
|
||||
ignore line: [ /usr/include/c++/13]
|
||||
ignore line: [ /usr/include/x86_64-linux-gnu/c++/13]
|
||||
ignore line: [ /usr/include/c++/13/backward]
|
||||
ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/13/include]
|
||||
ignore line: [ /usr/local/include]
|
||||
ignore line: [ /usr/include/x86_64-linux-gnu]
|
||||
ignore line: [ /usr/include]
|
||||
ignore line: [End of search list.]
|
||||
ignore line: [Compiler executable checksum: 7896445e4990772fdae9dc0659a99266]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_b1346.dir/']
|
||||
ignore line: [ as -v --64 -o CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccKBrizP.s]
|
||||
ignore line: [GNU assembler version 2.42 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.42]
|
||||
ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-linux-gnu/13/:/usr/libexec/gcc/x86_64-linux-gnu/13/:/usr/libexec/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/13/:/usr/lib/gcc/x86_64-linux-gnu/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/13/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.']
|
||||
ignore line: [[2/2] : && /usr/bin/c++ -v CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_b1346 && :]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/c++]
|
||||
ignore line: [COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper]
|
||||
ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa]
|
||||
ignore line: [OFFLOAD_TARGET_DEFAULT=1]
|
||||
ignore line: [Target: x86_64-linux-gnu]
|
||||
ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 13.3.0-6ubuntu2~24.04.1' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c ada c++ go d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-13-EldibY/gcc-13-13.3.0/debian/tmp-nvptx/usr amdgcn-amdhsa=/build/gcc-13-EldibY/gcc-13-13.3.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [Supported LTO compression algorithms: zlib zstd]
|
||||
ignore line: [gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04.1) ]
|
||||
ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-linux-gnu/13/:/usr/libexec/gcc/x86_64-linux-gnu/13/:/usr/libexec/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/13/:/usr/lib/gcc/x86_64-linux-gnu/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/13/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/13/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_b1346' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_b1346.']
|
||||
link line: [ /usr/libexec/gcc/x86_64-linux-gnu/13/collect2 -plugin /usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper -plugin-opt=-fresolution=/tmp/cci1AaX8.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_b1346 /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/13 -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/13/../../.. CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crtn.o]
|
||||
arg [/usr/libexec/gcc/x86_64-linux-gnu/13/collect2] ==> ignore
|
||||
arg [-plugin] ==> ignore
|
||||
arg [/usr/libexec/gcc/x86_64-linux-gnu/13/liblto_plugin.so] ==> ignore
|
||||
arg [-plugin-opt=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper] ==> ignore
|
||||
arg [-plugin-opt=-fresolution=/tmp/cci1AaX8.res] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [--build-id] ==> ignore
|
||||
arg [--eh-frame-hdr] ==> ignore
|
||||
arg [-m] ==> ignore
|
||||
arg [elf_x86_64] ==> ignore
|
||||
arg [--hash-style=gnu] ==> ignore
|
||||
arg [--as-needed] ==> ignore
|
||||
arg [-dynamic-linker] ==> ignore
|
||||
arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
|
||||
arg [-pie] ==> ignore
|
||||
arg [-znow] ==> ignore
|
||||
arg [-zrelro] ==> ignore
|
||||
arg [-o] ==> ignore
|
||||
arg [cmTC_b1346] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o]
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crti.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crti.o]
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o]
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/13] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/13]
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu]
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib]
|
||||
arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu]
|
||||
arg [-L/lib/../lib] ==> dir [/lib/../lib]
|
||||
arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu]
|
||||
arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib]
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/13/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/13/../../..]
|
||||
arg [CMakeFiles/cmTC_b1346.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
|
||||
arg [-lstdc++] ==> lib [stdc++]
|
||||
arg [-lm] ==> lib [m]
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [-lc] ==> lib [c]
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o]
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crtn.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crtn.o]
|
||||
collapse obj [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o] ==> [/usr/lib/x86_64-linux-gnu/Scrt1.o]
|
||||
collapse obj [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crti.o] ==> [/usr/lib/x86_64-linux-gnu/crti.o]
|
||||
collapse obj [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/crtn.o] ==> [/usr/lib/x86_64-linux-gnu/crtn.o]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/13] ==> [/usr/lib/gcc/x86_64-linux-gnu/13]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/13/../../../../lib] ==> [/usr/lib]
|
||||
collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu]
|
||||
collapse library dir [/lib/../lib] ==> [/lib]
|
||||
collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
|
||||
collapse library dir [/usr/lib/../lib] ==> [/usr/lib]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/13/../../..] ==> [/usr/lib]
|
||||
implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc]
|
||||
implicit objs: [/usr/lib/x86_64-linux-gnu/Scrt1.o;/usr/lib/x86_64-linux-gnu/crti.o;/usr/lib/gcc/x86_64-linux-gnu/13/crtbeginS.o;/usr/lib/gcc/x86_64-linux-gnu/13/crtendS.o;/usr/lib/x86_64-linux-gnu/crtn.o]
|
||||
implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/13;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib]
|
||||
implicit fwks: []
|
||||
|
||||
|
||||
...
|
||||
|
||||
---
|
||||
events:
|
||||
-
|
||||
|
|
@ -113,6 +378,65 @@ events:
|
|||
- "/usr/bin/site_perl"
|
||||
- "/usr/bin/vendor_perl"
|
||||
- "/usr/bin/core_perl"
|
||||
-
|
||||
kind: "find-v1"
|
||||
backtrace:
|
||||
- "/usr/share/cmake/Modules/CMakeDetermineCompiler.cmake:73 (find_program)"
|
||||
- "/usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake:69 (_cmake_find_compiler)"
|
||||
- "CMakeLists.txt:2 (project)"
|
||||
mode: "program"
|
||||
variable: "CMAKE_CXX_COMPILER"
|
||||
description: "CXX compiler"
|
||||
settings:
|
||||
SearchFramework: "NEVER"
|
||||
SearchAppBundle: "NEVER"
|
||||
CMAKE_FIND_USE_CMAKE_PATH: true
|
||||
CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: true
|
||||
CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: true
|
||||
CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: true
|
||||
CMAKE_FIND_USE_INSTALL_PREFIX: true
|
||||
names:
|
||||
- "c++"
|
||||
- "CC"
|
||||
- "g++"
|
||||
- "aCC"
|
||||
- "cl"
|
||||
- "bcc"
|
||||
- "xlC"
|
||||
- "icpx"
|
||||
- "icx"
|
||||
- "clang++"
|
||||
candidate_directories:
|
||||
- "/home/saqut/.local/bin/"
|
||||
- "/usr/local/bin/"
|
||||
- "/usr/bin/"
|
||||
- "/bin/"
|
||||
- "/usr/local/sbin/"
|
||||
- "/opt/cuda/bin/"
|
||||
- "/var/lib/flatpak/exports/bin/"
|
||||
- "/usr/lib/jvm/default/bin/"
|
||||
- "/usr/bin/site_perl/"
|
||||
- "/usr/bin/vendor_perl/"
|
||||
- "/usr/bin/core_perl/"
|
||||
searched_directories:
|
||||
- "/home/saqut/.local/bin/c++"
|
||||
- "/usr/local/bin/c++"
|
||||
found: "/usr/bin/c++"
|
||||
search_context:
|
||||
ENV{PATH}:
|
||||
- "/home/saqut/.local/bin"
|
||||
- "/home/saqut/.local/bin"
|
||||
- "/home/saqut/.local/bin"
|
||||
- "/usr/local/bin"
|
||||
- "/usr/bin"
|
||||
- "/bin"
|
||||
- "/usr/local/sbin"
|
||||
- "/opt/cuda/bin"
|
||||
- "/var/lib/flatpak/exports/bin"
|
||||
- "/usr/lib/jvm/default/bin"
|
||||
- "/usr/bin/site_perl"
|
||||
- "/usr/bin/vendor_perl"
|
||||
- "/usr/bin/core_perl"
|
||||
-
|
||||
kind: "find-v1"
|
||||
backtrace:
|
||||
|
|
@ -162,7 +486,7 @@ events:
|
|||
- "CMakeLists.txt:2 (project)"
|
||||
message: |
|
||||
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
|
||||
Compiler: /usr/bin/g++
|
||||
Compiler: /usr/bin/c++
|
||||
Build flags:
|
||||
Id flags:
|
||||
|
||||
|
|
@ -893,8 +1217,8 @@ events:
|
|||
checks:
|
||||
- "Detecting CXX compiler ABI info"
|
||||
directories:
|
||||
source: "/home/saqut/Masa\u00fcst\u00fc/saqutcompiler/build/CMakeFiles/CMakeScratch/TryCompile-KRXVj0"
|
||||
binary: "/home/saqut/Masa\u00fcst\u00fc/saqutcompiler/build/CMakeFiles/CMakeScratch/TryCompile-KRXVj0"
|
||||
source: "/home/saqut/Masa\u00fcst\u00fc/saqutcompiler/build/CMakeFiles/CMakeScratch/TryCompile-bNmRFu"
|
||||
binary: "/home/saqut/Masa\u00fcst\u00fc/saqutcompiler/build/CMakeFiles/CMakeScratch/TryCompile-bNmRFu"
|
||||
cmakeVariables:
|
||||
CMAKE_CXX_FLAGS: ""
|
||||
CMAKE_CXX_FLAGS_DEBUG: "-g"
|
||||
|
|
@ -905,19 +1229,19 @@ events:
|
|||
variable: "CMAKE_CXX_ABI_COMPILED"
|
||||
cached: true
|
||||
stdout: |
|
||||
Change Dir: '/home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/CMakeScratch/TryCompile-KRXVj0'
|
||||
Change Dir: '/home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/CMakeScratch/TryCompile-bNmRFu'
|
||||
|
||||
Run Build Command(s): /usr/bin/ninja -v cmTC_aae80
|
||||
[1/2] /usr/bin/g++ -v -o CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp
|
||||
Run Build Command(s): /usr/bin/ninja -v cmTC_a8847
|
||||
[1/2] /usr/bin/c++ -v -o CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/g++
|
||||
COLLECT_GCC=/usr/bin/c++
|
||||
Target: x86_64-pc-linux-gnu
|
||||
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust,cobol --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror --disable-fixincludes
|
||||
Thread model: posix
|
||||
Supported LTO compression algorithms: zlib zstd
|
||||
gcc version 16.1.1 20260430 (GCC)
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_aae80.dir/'
|
||||
/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/cc1plus -quiet -v -D_GNU_SOURCE /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_aae80.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -o /tmp/ccmm6pzq.s
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_a8847.dir/'
|
||||
/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/cc1plus -quiet -v -D_GNU_SOURCE /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_a8847.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -o /tmp/cch7GwnZ.s
|
||||
GNU C++20 (GCC) version 16.1.1 20260430 (x86_64-pc-linux-gnu)
|
||||
compiled by GNU C version 16.1.1 20260430, GMP version 6.3.0, MPFR version 4.2.2, MPC version 1.4.1, isl version isl-0.27-GMP
|
||||
|
||||
|
|
@ -934,15 +1258,15 @@ events:
|
|||
/usr/include
|
||||
End of search list.
|
||||
Compiler executable checksum: d47d0c990a24bc0dbaf3bd00656bd5f3
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_aae80.dir/'
|
||||
as -v --64 -o CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccmm6pzq.s
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_a8847.dir/'
|
||||
as -v --64 -o CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o /tmp/cch7GwnZ.s
|
||||
GNU assembler version 2.46.0 (x86_64-pc-linux-gnu) using BFD version (GNU Binutils) 2.46.0
|
||||
COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.'
|
||||
[2/2] : && /usr/bin/g++ -v -Wl,-v CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_aae80 && :
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.'
|
||||
[2/2] : && /usr/bin/c++ -v -Wl,-v CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_a8847 && :
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/g++
|
||||
COLLECT_GCC=/usr/bin/c++
|
||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper
|
||||
Target: x86_64-pc-linux-gnu
|
||||
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust,cobol --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror --disable-fixincludes
|
||||
|
|
@ -951,12 +1275,12 @@ events:
|
|||
gcc version 16.1.1 20260430 (GCC)
|
||||
COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_aae80' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_aae80.'
|
||||
/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/collect2 -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cce8QsNN.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-latomic_asneeded -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_aae80 /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../.. -L/lib -L/usr/lib -v CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -latomic_asneeded -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crtn.o
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_a8847' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_a8847.'
|
||||
/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/collect2 -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cce2Bg9n.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-latomic_asneeded -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_a8847 /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../.. -L/lib -L/usr/lib -v CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -latomic_asneeded -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crtn.o
|
||||
collect2 version 16.1.1 20260430
|
||||
/usr/bin/ld -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cce8QsNN.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-latomic_asneeded -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_aae80 /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../.. -L/lib -L/usr/lib -v CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -latomic_asneeded -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crtn.o
|
||||
/usr/bin/ld -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cce2Bg9n.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-latomic_asneeded -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_a8847 /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../.. -L/lib -L/usr/lib -v CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -latomic_asneeded -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crtn.o
|
||||
GNU ld (GNU Binutils) 2.46.0
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_aae80' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_aae80.'
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_a8847' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_a8847.'
|
||||
|
||||
exitCode: 0
|
||||
-
|
||||
|
|
@ -995,19 +1319,19 @@ events:
|
|||
Parsed CXX implicit link information:
|
||||
link line regex: [^( *|.*[/\\])(ld[0-9]*(|\\.[a-rt-z][a-z]*|\\.s[a-np-z][a-z]*|\\.so[a-z]+)|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)]
|
||||
linker tool regex: [^[ ]*(->|"|[0-9]+>[ -]*Build:[ 0-9]+ ms[ ]*)?[ ]*(([^"]*[/\\])?(ld[0-9]*(|\\.[a-rt-z][a-z]*|\\.s[a-np-z][a-z]*|\\.so[a-z]+)))("|,| |$)]
|
||||
ignore line: [Change Dir: '/home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/CMakeScratch/TryCompile-KRXVj0']
|
||||
ignore line: [Change Dir: '/home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/CMakeScratch/TryCompile-bNmRFu']
|
||||
ignore line: []
|
||||
ignore line: [Run Build Command(s): /usr/bin/ninja -v cmTC_aae80]
|
||||
ignore line: [[1/2] /usr/bin/g++ -v -o CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp]
|
||||
ignore line: [Run Build Command(s): /usr/bin/ninja -v cmTC_a8847]
|
||||
ignore line: [[1/2] /usr/bin/c++ -v -o CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/g++]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/c++]
|
||||
ignore line: [Target: x86_64-pc-linux-gnu]
|
||||
ignore line: [Configured with: /build/gcc/src/gcc/configure --enable-languages=ada c c++ d fortran go lto m2 objc obj-c++ rust cobol --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror --disable-fixincludes]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [Supported LTO compression algorithms: zlib zstd]
|
||||
ignore line: [gcc version 16.1.1 20260430 (GCC) ]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_aae80.dir/']
|
||||
ignore line: [ /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/cc1plus -quiet -v -D_GNU_SOURCE /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_aae80.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -o /tmp/ccmm6pzq.s]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_a8847.dir/']
|
||||
ignore line: [ /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/cc1plus -quiet -v -D_GNU_SOURCE /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_a8847.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -version -o /tmp/cch7GwnZ.s]
|
||||
ignore line: [GNU C++20 (GCC) version 16.1.1 20260430 (x86_64-pc-linux-gnu)]
|
||||
ignore line: [ compiled by GNU C version 16.1.1 20260430 GMP version 6.3.0 MPFR version 4.2.2 MPC version 1.4.1 isl version isl-0.27-GMP]
|
||||
ignore line: []
|
||||
|
|
@ -1024,15 +1348,15 @@ events:
|
|||
ignore line: [ /usr/include]
|
||||
ignore line: [End of search list.]
|
||||
ignore line: [Compiler executable checksum: d47d0c990a24bc0dbaf3bd00656bd5f3]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_aae80.dir/']
|
||||
ignore line: [ as -v --64 -o CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccmm6pzq.s]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_a8847.dir/']
|
||||
ignore line: [ as -v --64 -o CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o /tmp/cch7GwnZ.s]
|
||||
ignore line: [GNU assembler version 2.46.0 (x86_64-pc-linux-gnu) using BFD version (GNU Binutils) 2.46.0]
|
||||
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.']
|
||||
ignore line: [[2/2] : && /usr/bin/g++ -v -Wl -v CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_aae80 && :]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.']
|
||||
ignore line: [[2/2] : && /usr/bin/c++ -v -Wl -v CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_a8847 && :]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/g++]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/c++]
|
||||
ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper]
|
||||
ignore line: [Target: x86_64-pc-linux-gnu]
|
||||
ignore line: [Configured with: /build/gcc/src/gcc/configure --enable-languages=ada c c++ d fortran go lto m2 objc obj-c++ rust cobol --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror --disable-fixincludes]
|
||||
|
|
@ -1041,13 +1365,13 @@ events:
|
|||
ignore line: [gcc version 16.1.1 20260430 (GCC) ]
|
||||
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_aae80' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_aae80.']
|
||||
link line: [ /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/collect2 -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cce8QsNN.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-latomic_asneeded -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_aae80 /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../.. -L/lib -L/usr/lib -v CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -latomic_asneeded -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crtn.o]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_a8847' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_a8847.']
|
||||
link line: [ /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/collect2 -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cce2Bg9n.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-latomic_asneeded -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_a8847 /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../.. -L/lib -L/usr/lib -v CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -latomic_asneeded -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crtn.o]
|
||||
arg [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/collect2] ==> ignore
|
||||
arg [-plugin] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/liblto_plugin.so] ==> ignore
|
||||
arg [-plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper] ==> ignore
|
||||
arg [-plugin-opt=-fresolution=/tmp/cce8QsNN.res] ==> ignore
|
||||
arg [-plugin-opt=-fresolution=/tmp/cce2Bg9n.res] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-latomic_asneeded] ==> ignore
|
||||
|
|
@ -1063,7 +1387,7 @@ events:
|
|||
arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
|
||||
arg [-pie] ==> ignore
|
||||
arg [-o] ==> ignore
|
||||
arg [cmTC_aae80] ==> ignore
|
||||
arg [cmTC_a8847] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o] ==> obj [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o]
|
||||
arg [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o] ==> obj [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o]
|
||||
arg [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtbeginS.o] ==> obj [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtbeginS.o]
|
||||
|
|
@ -1075,7 +1399,7 @@ events:
|
|||
arg [-L/lib] ==> dir [/lib]
|
||||
arg [-L/usr/lib] ==> dir [/usr/lib]
|
||||
arg [-v] ==> ignore
|
||||
arg [CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
|
||||
arg [CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
|
||||
arg [-lstdc++] ==> lib [stdc++]
|
||||
arg [-lm] ==> lib [m]
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
|
|
@ -1087,7 +1411,7 @@ events:
|
|||
arg [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtendS.o] ==> obj [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtendS.o]
|
||||
arg [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crtn.o] ==> obj [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crtn.o]
|
||||
ignore line: [collect2 version 16.1.1 20260430]
|
||||
ignore line: [/usr/bin/ld -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cce8QsNN.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-latomic_asneeded -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_aae80 /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../.. -L/lib -L/usr/lib -v CMakeFiles/cmTC_aae80.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -latomic_asneeded -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crtn.o]
|
||||
ignore line: [/usr/bin/ld -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cce2Bg9n.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-latomic_asneeded -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -o cmTC_a8847 /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../.. -L/lib -L/usr/lib -v CMakeFiles/cmTC_a8847.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -latomic_asneeded -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crtn.o]
|
||||
linker tool for 'CXX': /usr/bin/ld
|
||||
collapse obj [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/Scrt1.o] ==> [/usr/lib/Scrt1.o]
|
||||
collapse obj [/usr/lib/gcc/x86_64-pc-linux-gnu/16.1.1/../../../../lib/crti.o] ==> [/usr/lib/crti.o]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/saqut.dir
|
||||
/home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/test.dir
|
||||
/home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/edit_cache.dir
|
||||
/home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/rebuild_cache.dir
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by CMake Version 4.3
|
||||
|
||||
# ALL_GOLDEN_SQT at CMakeLists.txt:40 (file)
|
||||
file(GLOB_RECURSE NEW_GLOB LIST_DIRECTORIES false "/home/saqut/Masaüstü/saqutcompiler/tests/golden/*.sqt")
|
||||
set(OLD_GLOB
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/basic.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/compound_mod.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/mod_by_zero.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/precedence.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/fibonacci/fib.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/logic/not_operator.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/logic/short_circuit.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/basic.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/do_while_once.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/do_while_truthy.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/for_break_continue.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/nested_break.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/while_break_continue.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/dce.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/folding.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/run_opt.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/string/equality.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/string/hello.sqt"
|
||||
"/home/saqut/Masaüstü/saqutcompiler/tests/golden/string/ordering_error.sqt"
|
||||
)
|
||||
if(NOT "${NEW_GLOB}" STREQUAL "${OLD_GLOB}")
|
||||
message("-- GLOB mismatch!")
|
||||
set(NEW_ONLY ${NEW_GLOB})
|
||||
set(OLD_ONLY ${OLD_GLOB})
|
||||
list(REMOVE_ITEM NEW_ONLY ${OLD_GLOB})
|
||||
list(REMOVE_ITEM OLD_ONLY ${NEW_GLOB})
|
||||
if(NEW_ONLY)
|
||||
message("The following files were added:")
|
||||
foreach(VAR_FILE IN LISTS NEW_ONLY)
|
||||
message(" +${VAR_FILE}")
|
||||
endforeach()
|
||||
endif()
|
||||
if(OLD_ONLY)
|
||||
message("The following files were removed:")
|
||||
foreach(VAR_FILE IN LISTS OLD_ONLY)
|
||||
message(" -${VAR_FILE}")
|
||||
endforeach()
|
||||
endif()
|
||||
file(TOUCH_NOCREATE "/home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/cmake.verify_globs")
|
||||
endif()
|
||||
|
|
@ -0,0 +1 @@
|
|||
# This file is generated by CMake for checking of the VerifyGlobs.cmake file
|
||||
|
|
@ -79,6 +79,15 @@ rule RERUN_CMAKE
|
|||
generator = 1
|
||||
|
||||
|
||||
#############################################
|
||||
# Rule for re-checking globbed directories.
|
||||
|
||||
rule VERIFY_GLOBS
|
||||
command = /usr/bin/cmake -P /home/saqut/Masaüstü/saqutcompiler/build/CMakeFiles/VerifyGlobs.cmake
|
||||
description = Re-checking globbed directories...
|
||||
generator = 1
|
||||
|
||||
|
||||
#############################################
|
||||
# Rule for cleaning all built files.
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
# CMake generated Testfile for
|
||||
# Source directory: /home/saqut/Masaüstü/saqutcompiler
|
||||
# Build directory: /home/saqut/Masaüstü/saqutcompiler/build
|
||||
#
|
||||
# This file includes the relevant testing commands required for
|
||||
# testing this directory and lists subdirectories to be tested as well.
|
||||
add_test(unit_tests "bash" "/home/saqut/Masaüstü/saqutcompiler/tests/run.sh")
|
||||
set_tests_properties(unit_tests PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;31;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_arithmetic_basic "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/basic.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/basic.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_arithmetic_basic PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_arithmetic_compound_mod "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/compound_mod.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/compound_mod.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_arithmetic_compound_mod PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_arithmetic_mod_by_zero_runtime_error "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/mod_by_zero.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/mod_by_zero.runtime_error" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden_error.cmake")
|
||||
set_tests_properties(golden_arithmetic_mod_by_zero_runtime_error PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;109;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_arithmetic_precedence "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/precedence.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/arithmetic/precedence.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_arithmetic_precedence PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_fibonacci_fib "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/fibonacci/fib.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/fibonacci/fib.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_fibonacci_fib PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_logic_not_operator "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/logic/not_operator.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/logic/not_operator.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_logic_not_operator PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_logic_short_circuit "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/logic/short_circuit.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/logic/short_circuit.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_logic_short_circuit PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_loops_basic "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/basic.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/basic.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_loops_basic PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_loops_do_while_once "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/do_while_once.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/do_while_once.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_loops_do_while_once PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_loops_do_while_truthy "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/do_while_truthy.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/do_while_truthy.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_loops_do_while_truthy PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_loops_for_break_continue "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/for_break_continue.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/for_break_continue.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_loops_for_break_continue PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_loops_nested_break "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/nested_break.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/nested_break.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_loops_nested_break PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_loops_while_break_continue "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/while_break_continue.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/loops/while_break_continue.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_loops_while_break_continue PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_opt_dce_ir_opt "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/dce.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/dce.ir_opt.expected" "-DCOMMAND=ir" "-DOPTIMIZED=1" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_opt_dce_ir_opt PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;64;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_opt_folding_ir_opt "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/folding.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/folding.ir_opt.expected" "-DCOMMAND=ir" "-DOPTIMIZED=1" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_opt_folding_ir_opt PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;64;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_opt_run_opt "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/run_opt.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/run_opt.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_opt_run_opt PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_opt_run_opt_run_opt "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/run_opt.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/opt/run_opt.run_opt.expected" "-DOPTIMIZED=1" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_opt_run_opt_run_opt PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;80;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_string_equality "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/string/equality.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/string/equality.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_string_equality PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_string_hello "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/string/hello.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/string/hello.expected" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden.cmake")
|
||||
set_tests_properties(golden_string_hello PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;51;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
add_test(golden_string_ordering_error_compile_error "/usr/bin/cmake" "-DBINARY=/home/saqut/Masaüstü/saqutcompiler/build/saqut" "-DSOURCE=/home/saqut/Masaüstü/saqutcompiler/tests/golden/string/ordering_error.sqt" "-DEXPECTED=/home/saqut/Masaüstü/saqutcompiler/tests/golden/string/ordering_error.compile_error" "-P" "/home/saqut/Masaüstü/saqutcompiler/cmake/run_golden_error.cmake")
|
||||
set_tests_properties(golden_string_ordering_error_compile_error PROPERTIES _BACKTRACE_TRIPLES "/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;95;add_test;/home/saqut/Masaüstü/saqutcompiler/CMakeLists.txt;0;")
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,39 @@
|
|||
# run_golden.cmake — tek bir golden test çalıştırır ve çıktıyı karşılaştırır.
|
||||
#
|
||||
# Parametreler (cmake -D ile geçilir):
|
||||
# BINARY — saqut binary yolu
|
||||
# SOURCE — test .sqt dosyası (tam yol)
|
||||
# EXPECTED — beklenen çıktı dosyası (tam yol)
|
||||
# COMMAND — "run" (varsayılan) veya "ir"
|
||||
# OPTIMIZED — 1 ise --optimized bayrağı eklenir
|
||||
|
||||
if(NOT DEFINED COMMAND)
|
||||
set(COMMAND "run")
|
||||
endif()
|
||||
|
||||
set(EXTRA_FLAGS "")
|
||||
if(OPTIMIZED)
|
||||
list(APPEND EXTRA_FLAGS "--optimized")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${BINARY}" "${COMMAND}" ${EXTRA_FLAGS} "file:${SOURCE}"
|
||||
OUTPUT_VARIABLE ACTUAL
|
||||
ERROR_VARIABLE STDERR_OUT
|
||||
RESULT_VARIABLE EXIT_CODE
|
||||
)
|
||||
|
||||
if(NOT EXIT_CODE EQUAL 0)
|
||||
message(FATAL_ERROR
|
||||
"saqut ${COMMAND} başarısız (exit ${EXIT_CODE}):\n${STDERR_OUT}")
|
||||
endif()
|
||||
|
||||
file(READ "${EXPECTED}" EXPECTED_CONTENT)
|
||||
|
||||
if(NOT ACTUAL STREQUAL EXPECTED_CONTENT)
|
||||
message(FATAL_ERROR
|
||||
"Çıktı uyuşmuyor: ${SOURCE}\n"
|
||||
"--- BEKLENEN ---\n${EXPECTED_CONTENT}"
|
||||
"--- GERÇEK ---\n${ACTUAL}"
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# run_golden_error.cmake — derleme hatası BEKLEYEN golden test.
|
||||
#
|
||||
# Parametreler (cmake -D ile geçilir):
|
||||
# BINARY — saqut binary yolu
|
||||
# SOURCE — test .sqt dosyası (tam yol)
|
||||
# EXPECTED — beklenen hata içeriği (.compile_error dosyası); stderr bu
|
||||
# metni içermeli (regex veya düz dize olarak eşleşir)
|
||||
|
||||
execute_process(
|
||||
COMMAND "${BINARY}" run "file:${SOURCE}"
|
||||
OUTPUT_VARIABLE STDOUT_OUT
|
||||
ERROR_VARIABLE STDERR_OUT
|
||||
RESULT_VARIABLE EXIT_CODE
|
||||
)
|
||||
|
||||
if(EXIT_CODE EQUAL 0)
|
||||
message(FATAL_ERROR
|
||||
"Derleme hatası bekleniyordu ama program başarıyla çalıştı: ${SOURCE}\n"
|
||||
"Çıktı: ${STDOUT_OUT}")
|
||||
endif()
|
||||
|
||||
file(READ "${EXPECTED}" EXPECTED_CONTENT)
|
||||
string(STRIP "${EXPECTED_CONTENT}" EXPECTED_CONTENT)
|
||||
|
||||
if(NOT STDERR_OUT MATCHES "${EXPECTED_CONTENT}")
|
||||
message(FATAL_ERROR
|
||||
"Beklenen '${EXPECTED_CONTENT}' mesajı stderr'de bulunamadı: ${SOURCE}\n"
|
||||
"Stderr: ${STDERR_OUT}")
|
||||
endif()
|
||||
|
|
@ -10,12 +10,11 @@
|
|||
> Tartışmanın tam akışı için bkz. `docs/transkript-frontend-tasarim.md`.
|
||||
> Uygulama planı için bkz. `docs/roadmap-frontend.md`.
|
||||
>
|
||||
> ⚠️ **Yapılan vs planlanan:** Bu belgedeki ADR-006…019 **tasarım kararlarıdır**;
|
||||
> tarif edilen makine (sembol tablosu, semantik analiz, tip sistemi, diagnostic,
|
||||
> optimizasyon, IR+VM) **henüz kodlanmamıştır.** Bugün çalışan: lexer, tokenizer,
|
||||
> Pratt parser, AST, AST'nin JSON serileştirmesi, CLI iskeleti, konum takibi ve
|
||||
> basit aritmetiği düşüren minimal bir IR deneyi. Hiçbir ADR, var olmayan bir
|
||||
> mekanizmayı varmış gibi anlatmaz.
|
||||
> ✅ **Uygulama durumu:** Bu belgedeki ADR-006…019 kararlarında tarif edilen
|
||||
> makine **kodlandı ve çalışıyor.** Sembol tablosu, semantik analiz, tip sistemi,
|
||||
> diagnostic motoru, optimizasyon (constant folding + DCE), IR üreteci ve bytecode
|
||||
> VM'in tamamı uygulandı. `examples/fibonacci.sqt` uçtan uca çalışıyor.
|
||||
> Güncel "çalışıyor / henüz yok" listesi için bkz. `CLAUDE.md`.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -105,46 +104,45 @@ sembol tablosunun optimizasyondan önceki ve sonraki halini ayrı ayrı görebil
|
|||
symbol bağı, erişilebilirlik, constness ekler). Ağacı **bozmaz**, zenginleştirir.
|
||||
Orijinal AST hâlâ kaynak kodun tam izdüşümüdür.
|
||||
|
||||
2. **Optimizasyon dönüşümü, ağacın bir KOPYASI (klon) üzerinde yapılır.**
|
||||
Orijinal analizli AST = "öncesi"; klon + dönüştürülmüş AST = "sonrası".
|
||||
Ağaç klonlamak ucuz ve basittir, yalnızca `--optimized` istendiğinde yapılır.
|
||||
2. **Optimizasyon dönüşümü iki yolla yapılabilir:**
|
||||
|
||||
**Sonuç:** Hem "bellek canavarı" felsefesi korunur (orijinal AST her şeyi tutar),
|
||||
hem optimizasyon yapılır, hem de öncesi/sonrası ayrı ayrı incelenebilir.
|
||||
a. **`ast` komutu için klon:** orijinal AST dokunulmadan kalır, klon üstünde
|
||||
pass'ler çalışır. Kullanıcı "öncesi" ve "sonrası" AST'yi ayrı ayrı
|
||||
görebilir. `OptimizationManager::optimize()` bu yolu kullanır.
|
||||
|
||||
b. **Diğer tüm komutlar için yerinde (in-place):** `run --optimized`,
|
||||
`ir --optimized` vb. tek versiyon üretiyor — orijinali saklamaya gerek yok.
|
||||
`OptimizationManager::runPassesInPlace()` bu yolu kullanır, klon maliyeti yok.
|
||||
|
||||
**Sonuç:** "bellek canavarı" felsefesi `ast` komutunda korunur; diğer komutlar
|
||||
gereksiz klon maliyeti taşımaz.
|
||||
|
||||
```
|
||||
saqut ast file.sqt → ham + annotate edilmiş AST (1+2 burada durur)
|
||||
saqut ast file.sqt --optimized → klon, folding uygulanmış (3 var)
|
||||
saqut run file.sqt --optimized → yerinde optimize → IR → VM (klon yok)
|
||||
saqut ir file.sqt --optimized → yerinde optimize → IR dump (klon yok)
|
||||
```
|
||||
|
||||
### Güncelleme — Klon maliyeti yük taşır (load-bearing)
|
||||
### Güncelleme — Klon ve sembol tablosu paylaşımı
|
||||
|
||||
İlk metin "ağaç klonlamak ucuz ve basittir" diyordu; bu **klon maliyetini hafife
|
||||
alıyor** ve bir **tutarlılık (coherence) problemini** atlıyordu. Düzeltme:
|
||||
`deepClone` sembol tablosunu yeniden eşlemez (remap etmez) — klondaki
|
||||
`IdentifierNode::resolvedSymbol` orijinal `Symbol` nesnelerini gösterir. Bu
|
||||
**güvenlidir**, çünkü:
|
||||
|
||||
`ASTNode::clone()` "belki gerekir" değil, **merkezi ve spesifiye edilmesi
|
||||
zorunlu** bir bileşendir; tüm öncesi/sonrası hikâyesi ona dayanır (bkz. roadmap
|
||||
Faz 4'te clone() yükseltildi).
|
||||
- `Symbol::references` bir **konum listesi** (`std::vector<SourceLocation>`),
|
||||
referans sayacı değildir. Klonda bir `IdentifierNode` silindiğinde bu liste
|
||||
değişmez.
|
||||
- `IdentifierNode` destructor'ı yoktur; `resolvedSymbol`'e dokunan hiçbir yıkıcı
|
||||
kodu çalışmaz.
|
||||
- Klondaki pass'ler Symbol nesnelerini **okur** (slot numarası, tip vb.),
|
||||
**yazmaz** — paylaşım salt-okunur (read-only) kullanımdır.
|
||||
|
||||
**Klonlanırken karar verilmesi gereken iki nokta (açıkça belgele):**
|
||||
**Parent pointer'lar** ise yeniden bağlanır — klon node'larının `parent`'ı
|
||||
orijinali değil, klonu gösterir (deepClone bunu zaten yapar).
|
||||
|
||||
1. **Parent pointer'lar yeniden bağlanmalı.** Klon node'larının `parent`'ı
|
||||
orijinali değil, klonu göstermeli; yoksa yapısal doğrulama ve dönüşümler
|
||||
yanlış ağaçta gezinir.
|
||||
|
||||
2. **`IdentifierNode → Symbol` bağları: paylaş mı, yeniden eşle mi?**
|
||||
- **Paylaş** (klon ve orijinal aynı sembol tablosuna işaret eder): ucuz, ama
|
||||
klonu optimize etmek orijinalin **referans sayımlarını bozar** (DCE klonda
|
||||
bir kullanımı silince orijinalin Symbol ref-count'u da düşer).
|
||||
- **Yeniden eşle** (klona ait bir sembol tablosu kopyası): doğru, ama ucuz
|
||||
değil.
|
||||
- **Karar:** `--optimized` istendiğinde sembol tablosu da **klonlanır ve
|
||||
yeniden eşlenir** (remap). Doğruluk, ucuzluğa tercih edilir; klon zaten
|
||||
yalnızca optimizasyon istendiğinde üretilir, sıcak yol değildir. "Ucuz"
|
||||
iddiası kaldırıldı.
|
||||
|
||||
Bu, ADR-013'teki "ref-count Symbol'da yaşar" kararıyla tutarlıdır: ref-count
|
||||
Symbol'da olduğu için, klonun kendi Symbol'larına sahip olması şarttır.
|
||||
Önceki versiyon "sembol tablosu klonlanır ve remap edilir" diyordu; bu hem hiç
|
||||
implement edilmedi hem de gerekli değildi. Düzeltildi.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -667,7 +665,7 @@ modelini birlikte zorlar — ikisi de bu yüzden ertelendi.
|
|||
| ADR | Konu | Karar |
|
||||
|---|---|---|
|
||||
| 006 | Frontend mimarisi | Çok-aşamalı; frontend/middle-end/backend katmanları |
|
||||
| 007 | Analiz vs optimizasyon | Analiz yerinde işaretler; optimizasyon klonda dönüştürür; `clone()` merkezi, sembol tablosu remap edilir |
|
||||
| 007 | Analiz vs optimizasyon | Analiz yerinde; `ast` komutu klon üstünde dönüştürür (öncesi/sonrası karşılaştırması); `run`/`ir` yerinde optimize eder (klon yok); sembol bağları salt-okunur paylaşım (remap gerekmez) |
|
||||
| 008 | Optimizasyon konumu | Basitler AST'de, dataflow gerektirenler IR'de |
|
||||
| 009 | Pass yönetimi | Fixpoint döngüsü, toggle'lı; monotonluk/iterasyon-tavanı değişmezi; akışa-bağlı analiz tur başına tazelenir |
|
||||
| 010 | Tip sistemi | Minimal+genişletilebilir Type; gizli dönüşüm yok; Error tipi; tamsayı literali bağlama-göre tiplenir |
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
# ADR-008: && ve || kısa devre değerlendirmesi
|
||||
|
||||
## Durum
|
||||
Kabul edildi.
|
||||
|
||||
## Bağlam
|
||||
Mevcut kodda `&&` ve `||` çalışma anında bozuk: IR üretici bu operatörler için
|
||||
`case` içermiyor, `default` koluna düşüp `LOAD_CONST 0` üretiyor — yani değişken
|
||||
operandlarda her zaman `false` dönüyor. Yalnızca her iki operand sabit olduğunda
|
||||
sabit katlama doğru sonucu veriyor. (Kanıt: `ir_generator.cpp:395-413`,
|
||||
`constant_folding.hpp:107-112`; davranış referansı bölüm B.)
|
||||
|
||||
## Karar
|
||||
`&&` ve `||` **KISA DEVRE** değerlendirilir:
|
||||
|
||||
- `a && b`: `a` false ise `b` **HİÇ değerlendirilmez**, sonuç `false`.
|
||||
- `a || b`: `a` true ise `b` **HİÇ değerlendirilmez**, sonuç `true`.
|
||||
|
||||
Bu, bu operatörlerin sıradan ikili işlem (iki tarafı hesapla sonra birleştir)
|
||||
**DEĞİL**, bir dallanma olarak üretilmesi gerektiği anlamına gelir.
|
||||
|
||||
IR şeması:
|
||||
|
||||
```
|
||||
a && b:
|
||||
slot_a = [a değerlendir]
|
||||
result = freshSlot()
|
||||
LOAD_CONST result, 0 ; varsayılan: false
|
||||
JIF_FALSE slot_a → DONE ; a false? b'yi atla, result=0 kalsın
|
||||
slot_b = [b değerlendir]
|
||||
LOAD_SLOT result, slot_b ; result = b'nin değeri
|
||||
DONE:
|
||||
|
||||
a || b:
|
||||
slot_a = [a değerlendir]
|
||||
result = freshSlot()
|
||||
LOAD_CONST result, 1 ; varsayılan: true
|
||||
JIF_TRUE slot_a → DONE ; a true? b'yi atla, result=1 kalsın
|
||||
slot_b = [b değerlendir]
|
||||
LOAD_SLOT result, slot_b ; result = b'nin değeri
|
||||
DONE:
|
||||
```
|
||||
|
||||
`||` için `JIF_TRUE` opcode'u gerekir. `JIF_FALSE`'un simetriği olarak
|
||||
`instruction.hpp`'e ve `interpreter.cpp`'e eklendi. `do-while` döngüsünün
|
||||
mevcut `EQUAL_EQUAL(cond, 1)` geçici çözümü bu opcode'dan faydalanabilir
|
||||
(ayrı düzeltme — bu ADR kapsamı dışı).
|
||||
|
||||
## Gerekçe
|
||||
- C-ailesi dillerin (C, Go, Java, JS, C#) tamamı kısa devre yapar; hedef kitle
|
||||
bunu bekler.
|
||||
- Performans artısı: gereksiz sağ-taraf değerlendirmesi atlanır; kısa devre
|
||||
OLMAYAN versiyon her iki tarafı da her zaman hesaplayacağı için daha yavaştır.
|
||||
- Niş ile uyumlu: derleyici "şu çağrı şu durumda atlandı" diye gösterebilir.
|
||||
|
||||
## Sonuçlar
|
||||
- Tek dezavantaj: mantıksal operatörün sağındaki yan etki koşullu çalışır.
|
||||
Bu kabul edilir; yan etkiyi koşula gömmek zaten kötü kalıptır.
|
||||
- Sabit katlama yolu (`constant_folding.hpp`) zaten doğru çalışıyordu ve
|
||||
değiştirilmedi; bu düzeltme yalnızca değişken-operand (IR üretim) yolunu etkiler.
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
# saQut — Mimari Referans
|
||||
|
||||
**Programlanabilir, incelenebilir bir derleyici — bir "alet çantası" (toolbox).**
|
||||
|
||||
saQut'un asıl varlık sebebi dilin kendisinden çok, **derleme sürecinin her
|
||||
aşamasının dışarıdan görülebilir ve müdahale edilebilir olmasıdır.** Token'lar,
|
||||
AST, sembol tablosu, optimizasyonun öncesi/sonrası ve IR — hepsi ayrı ayrı
|
||||
incelenebilir. Dil, bu aletin üzerinde çalıştığı küçük, prosedürel bir
|
||||
örnektir; vitrin değil, alet.
|
||||
|
||||
Uygulama dili **C++**'tır (header-only eğilimli, bkz. `docs/fikirler.md` ADR-003).
|
||||
|
||||
---
|
||||
|
||||
## Şu an ne çalışıyor, ne çalışmıyor
|
||||
|
||||
Belgeler **planlanan** ile **yapılan**ı net ayırır. Bugünkü gerçek durum:
|
||||
|
||||
### ✅ Çalışıyor (built)
|
||||
- **Lexer** — karakter seviyesi tarama, konum takibi.
|
||||
- **Tokenizer** — token üretimi (6 token tipi), yorum satırı desteği.
|
||||
- **Pratt parser** — ifade (Pratt) + statement (recursive descent) ayrıştırma.
|
||||
- **AST** — fonksiyon, blok, değişken tanımı, if/for/while/do-while/return,
|
||||
ifade node'ları.
|
||||
- **AST'nin JSON serileştirmesi** — `saqut ast` ile incelenebilir.
|
||||
- **CLI komut yapısı** — `tokens`, `ast`, `symbols`, `run` iskeletleri.
|
||||
- **Kaynak konum takibi** (SourceLocation) — offset → (satır, sütun).
|
||||
- **Minimal IR deneyi** — basit aritmetiği düşürür (örn. `1 + (7/3)` → kısa
|
||||
doğrusal komut dizisi). Henüz tam bir backend değil, bir deneydir.
|
||||
|
||||
### 🚧 Henüz yok (planned)
|
||||
- Sembol tablosu
|
||||
- Semantik analiz
|
||||
- Tip sistemi
|
||||
- Diagnostic (hata raporlama) motoru
|
||||
- Optimizasyon
|
||||
- IR + bytecode VM ile çalıştırma
|
||||
|
||||
> `feature/frontend-analysis` dalı şu an yalnızca bu yapılmamış işin **tasarım
|
||||
> belgelerini** içerir, kodunu değil.
|
||||
|
||||
**Birinci kilometre taşı ("bitti" tanımı):** derleyici **fibonacci'yi**
|
||||
(recursive + iterative) ve basit matematik/döngü programlarını **derleyip
|
||||
çalıştırabilmeli.** Referans program: `examples/fibonacci.sqt`.
|
||||
|
||||
---
|
||||
|
||||
## Dil kimliği (kilitli)
|
||||
|
||||
Prosedürel, **C ailesi sözdizimi**, **value semantics**. İlk ifade doğrudan bir
|
||||
işlem/tanım olabilir; zorunlu class/`main` boilerplate'i yoktur (Java'nın aksine).
|
||||
|
||||
| Özellik | Karar |
|
||||
|---|---|
|
||||
| Class / OOP / kalıtım | **Yok** |
|
||||
| Closure | **Yok** |
|
||||
| Generic | **Yok** |
|
||||
| Kullanıcıya açık pointer (`*` / `&`) | **Yok** — derleyici/runtime içeride pointer'ı serbestçe kullanır |
|
||||
| `struct` | **Var** |
|
||||
| Tipli fonksiyonlar (dönüş + parametre) | **Var** |
|
||||
| Array (`int[]`) | **Var** |
|
||||
| `interface` | **Ertelendi** (v0 değil — gerekçe ADR-018) |
|
||||
| `auto` / tip çıkarımı | **Yok** |
|
||||
| Gizli int↔float dönüşümü | **Yok** (tek istisna: sabit folding) |
|
||||
|
||||
Gerekçe: prosedürel tasarım semantik karmaşıklığı en aza indirir ve hedeflerle
|
||||
(fibonacci, matematik, sıralama, ayrıştırma) örtüşür. Standart C'de `class`
|
||||
yoktur (o C++'tır); C, struct + fonksiyonun yettiğini kanıtlar.
|
||||
|
||||
---
|
||||
|
||||
## Çalıştırma modeli (kilitli): IR + bytecode VM
|
||||
|
||||
saQut, kendi **IR**'sine derler ve bu IR'yi bir **yorumlayıcı döngü (bytecode
|
||||
VM)** ile çalıştırır.
|
||||
|
||||
- **Tree-walker DEĞİL** (çok yavaş).
|
||||
- **Gerçek makine-kodu JIT DEĞİL.** Makine kodu üretimi (register allocation,
|
||||
ABI/çağırma sözleşmeleri, çalıştırılabilir `mmap` bellek) **kapsam dışıdır** —
|
||||
tek faydası ham hızdır ve hız burada öncelik değildir. Öncelikler
|
||||
**determinizm** ve **incelenebilirliktir**; bytecode VM ikisini de doğrudan
|
||||
sağlar.
|
||||
- **Bellek bu modelde kolaydır:** host (C++) heap'i kullanılır; v0 için özel
|
||||
runtime allocator gerekmez.
|
||||
- **C'ye transpile, geçerli bir İKİNCİ backend olarak ileride kalır** (frontend
|
||||
backend-bağımsızdır — middle-end ayrımının amacı budur, ADR-006). İleride
|
||||
makine kodu istenirse elle code generator yazmak yerine **libgccjit / LLVM'e
|
||||
bağlanılır** — ama bu çok uzak gelecektir.
|
||||
|
||||
> Eski belge/konuşmalarda geçen "JIT" terimi yanlış yönlendiricidir; doğru
|
||||
> çerçeve **IR + VM**'dir.
|
||||
|
||||
---
|
||||
|
||||
## Tasarım felsefesi — neden saQut farklı?
|
||||
|
||||
saQut "daha iyi bir dil" iddiasında değil. Farkı, **derleyiciyi bir platform**
|
||||
olarak ele almasında. İki taahhüt üstüne kuruludur:
|
||||
|
||||
**1. Cam (gör + sorgula + içine müdahale et).** Her aşama — token, AST, sembol
|
||||
tablosu, tip, IR — kararlı, makine-okur ve **çift yönlü** bir arayüzden
|
||||
erişilebilir olmalıdır. Sadece "dök ve göster" değil: kendi AST'ini verip tip
|
||||
kontrolü isteyebilmeli, IR verip çalıştırabilmelisin. **Turnusol testi:** bir
|
||||
yabancı, yalnızca `saqut ast` + `saqut symbols` çıktısından, bizden habersiz bir
|
||||
LSP yazabiliyor mu? Cevap "evet" ise platform gerçektir.
|
||||
|
||||
**2. Kafes (deterministik + yetenek-güvenli çalıştırma).** Pointer yok, value
|
||||
semantics, scope-tabanlı bellek ve **tek dış-dünya kapısı olan FFI seam**
|
||||
(ADR-016) sayesinde saQut kodu, host'un açıkça izin verdiği fonksiyonlar dışında
|
||||
dünyaya dokunamaz. Bytecode VM deterministiktir (ADR-015): aynı girdi → aynı
|
||||
çıktı → aynı çalışma. "Sadelik" diye tasarlanan bu kararlar aslında bir
|
||||
**yetenek-güvenliği (capability sandbox)** kurar — güvenilmeyen veya
|
||||
AI-üretimi kodu güvenle çalıştırmak için biçilmiş kaftan.
|
||||
|
||||
**Bu ikisinin ödülü — kayıt & tekrar (record-replay).** 🚧 *(vizyon, v0 değil;
|
||||
bkz. issue #94.)* Belirsizliğin tek kaynağı (kullanıcı girdisi, zaman, IO,
|
||||
GC/thread kararları) FFI kapısından geçtiği için, mükemmel tekrar oynatma için
|
||||
**her değişkeni her adımda kaydetmek gerekmez** — yalnızca kapıdan geçen değerler
|
||||
kaydedilir, gerisi VM deterministik olarak yeniden çalıştırılarak üretilir. Boyut
|
||||
gigabayttan kilobayta düşer. Replay modunda FFI çağrıları gerçekten çalışmaz,
|
||||
kaydedilmiş değeri döndürür (dosyayı tekrar silmez, sunucuya tekrar istek atmaz).
|
||||
Böylece "benim makinemde çalışıyor, müşteride patlıyor" sorunu: müşteri bir dump
|
||||
yollar, sen çöküşü adım adım, aynı verilerle geri sararsın.
|
||||
|
||||
> Log, önceden sormayı akıl ettiğin sorulara cevap verir; **tekrar-oynatma,
|
||||
> çöküşten *sonra* aklına gelen sorulara.** Zaman-yolculuğu hata ayıklama ayrı
|
||||
> bir altyapı değildir — cam sorgularına bir **zaman koordinatı** eklemektir.
|
||||
|
||||
⚠️ Bu ödülün bedeli v0'da ödenir: **determinizm kutsaldır ve her belirsizlik
|
||||
kaynağı kayıt-altına-alınabilir tek kapıdan geçmelidir.** Sonradan eklenemez;
|
||||
baştan korunur.
|
||||
|
||||
---
|
||||
|
||||
## Mimari hatlar
|
||||
|
||||
```
|
||||
KAYNAK KOD
|
||||
│ lexer
|
||||
▼
|
||||
TOKEN'LAR ────────────── saqut tokens
|
||||
│ parser (Pratt + recursive descent)
|
||||
▼
|
||||
AST ──────────────────── saqut ast
|
||||
│ sembol toplama (iki geçişli) ┐
|
||||
▼ │
|
||||
SEMBOL TABLOSU ───────── saqut symbols │ FRONTEND
|
||||
│ semantik analiz (annotation) │ (yapı + anlam)
|
||||
▼ │
|
||||
ANNOTATE EDİLMİŞ AST ─── saqut ast ┘
|
||||
│ optimizasyon (opsiyonel, klon üstünde) ── MIDDLE-END
|
||||
▼
|
||||
IR ───────────────────── (planlanan) ┐
|
||||
│ bytecode VM / yorumlayıcı döngü │ BACKEND
|
||||
▼ │ (çalıştırma + FFI seam)
|
||||
ÇALIŞTIRMA / ÇIKTI ───── saqut run ┘
|
||||
```
|
||||
|
||||
- **Frontend** yapıyı ve anlamı modeller (tip, scope, dataflow).
|
||||
- **"Hangi çekirdek, hangi cihaz, ne zaman, hangi çıktı formatı"** runtime/backend
|
||||
meselesidir — frontend'e yüklenmez.
|
||||
|
||||
---
|
||||
|
||||
## CLI (mevcut + planlanan)
|
||||
|
||||
```
|
||||
# --- çalışıyor ---
|
||||
saqut tokens file:kaynak.sqt # token listesi
|
||||
saqut ast file:kaynak.sqt # AST (JSON)
|
||||
saqut symbols file:kaynak.sqt # sembol tablosu (iskelet)
|
||||
|
||||
# --- planlanan ---
|
||||
saqut run file:kaynak.sqt # IR üret + bytecode VM ile çalıştır
|
||||
saqut ast file:kaynak.sqt --optimized # klon, optimize edilmiş AST (öncesi/sonrası)
|
||||
saqut transpile file:kaynak.sqt -o prog.c # ikinci backend (ileride)
|
||||
```
|
||||
|
||||
Tasarım gereği her aşamanın çıktısı erken bir noktada dosyalanabilir/loglanabilir
|
||||
(programlanabilir derleyici). Token, ham AST, optimize AST ve IR ayrı ayrı
|
||||
kaydedilebilir.
|
||||
|
||||
---
|
||||
|
||||
## Batteries / stdlib — kuzey yıldızı, ertelendi
|
||||
|
||||
Gerçek bir genel sürüm pil ile gelmeli (sıralama, sıkıştırma, kripto,
|
||||
JSON/XML/HTML ayrıştırma). Ama bu **bugünün işi ve v0.1 değildir.**
|
||||
|
||||
Mimari çerçeve (monolit korkusunu önler): derleyici pilleri çekirdeğine
|
||||
gömmez. Bunun yerine **küçük bir gerçek builtin kümesi** (`print`, temel
|
||||
zorunlular) + **gerisi kütüphane/FFI** ile gelir. "Batteries" sorunu aslında
|
||||
bir **sınır (FFI/link seam) sorunudur**, "zlib'i yeniden yaz" sorunu değil.
|
||||
Sınır bir kez çizilir, piller üstünde sonsuza dek birikir.
|
||||
|
||||
- **JSON/XML/HTML ayrıştırıcıları saQut'un kendisinde yazılabilir** (string +
|
||||
struct + fonksiyon + kontrol akışı yeter). İlk gerçek demo programları.
|
||||
- **Sıkıştırma/kripto:** denenmiş C kütüphanelerine FFI ile bağlan. **Kripto
|
||||
asla elle yazılmaz.**
|
||||
- **Bugüne tek yansıması:** IR/runtime tasarlanırken **bilinçli bir FFI seam**
|
||||
("host fonksiyonu çağır" deliği) bırakılır. `print` bunu zaten zorlar — bunu
|
||||
kaza değil, **kasıtlı bir mekanizma** yapıyoruz (ADR-016).
|
||||
|
||||
---
|
||||
|
||||
## Belge haritası
|
||||
|
||||
| Belge | İçerik |
|
||||
|---|---|
|
||||
| `docs/fikirler.md` | ADR-001…005: backend stratejisi, parser, header-only, token, IR |
|
||||
| `docs/adr-frontend-analiz.md` | ADR-006…019: frontend, analiz/optimizasyon, çalıştırma modeli, FFI, interface, bellek |
|
||||
| `docs/roadmap-frontend.md` | Faz-faz uygulama planı (sembol tablosu → fibonacci) |
|
||||
| `docs/transkript-frontend-tasarim.md` | Tasarım oturumunun transkripti |
|
||||
| `examples/fibonacci.sqt` | Geçerli referans program (semantik + kod üretimi fixture'ı) |
|
||||
| `examples/parser-stress/` | Yalnızca parser'ı zorlayan, **geçerli olmayan** fixture'lar |
|
||||
|
||||
---
|
||||
|
||||
## İlke
|
||||
|
||||
Bir şey çalışmadan önce çerçeve inşa etmekten kaçın. Önce **uçtan uca tek bir
|
||||
dikey dilim** çalıştır (kaynak → IR → çalıştır; tamsayı aritmetiği + değişken +
|
||||
kontrol akışı + tek bir `print`). Modülerlik bir kuzey yıldızıdır, v0.1
|
||||
gereksinimi değil; ihtiyaç doğmadan eklenen her soyutlama **daha az değil, daha
|
||||
çok** karmaşıklıktır.
|
||||
|
|
@ -18,9 +18,10 @@
|
|||
> **çok uzak gelecektir**. ADR-001'deki karşılaştırmalar o gün için geçerli.
|
||||
> - "HeavyIR/LightIR" ikiliği (ADR-005) bir **gelecek fikri** olarak durur; v0'ın
|
||||
> IR+VM hedefi tek, basit bir IR'dir + **FFI seam** (ADR-016).
|
||||
> - **Yapılan vs planlanan:** ADR-001'deki "mevcut durum" listesi hâlâ doğrudur
|
||||
> (lexer/tokenizer/parser/AST + minimal IR deneyi çalışır); kod üretimi ve VM
|
||||
> **henüz yoktur.**
|
||||
> - **Yapılan vs planlanan:** Tüm pipeline uygulandı. `examples/fibonacci.sqt`
|
||||
> uçtan uca çalışıyor (lexer → tokenizer → parser → sembol tablosu → tip
|
||||
> denetleyici → optimizasyon → IR üreteci → bytecode VM). ADR-001'deki
|
||||
> "mevcut durum" listesi artık tarihseldir; güncel durum için bkz. `CLAUDE.md`.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -10,21 +10,12 @@
|
|||
> yorum satırlarıyla takip edilebilir olmalıdır (header-only tarzı korunur,
|
||||
> bkz. ADR-003).
|
||||
>
|
||||
> ⚠️ **Yapılan vs planlanan:** Bugün çalışan = lexer, tokenizer, Pratt parser,
|
||||
> AST, AST'nin JSON serileştirmesi, CLI iskeleti, konum takibi, basit aritmetiği
|
||||
> düşüren minimal IR deneyi. Bu yol haritasındaki **her şey planlıdır** (sembol
|
||||
> tablosu, semantik analiz, tip sistemi, diagnostic, optimizasyon).
|
||||
> ✅ **Birinci kilometre taşı AŞILDI.** Faz 0–4 uygulandı; `examples/fibonacci.sqt`
|
||||
> uçtan uca çalışıyor. Bu yol haritası artık tarihsel bir referanstır.
|
||||
>
|
||||
> 🎯 **Bu haftanın işi:** **sembol tablosu + iki-geçişli toplayıcı** (Faz 2),
|
||||
> hedef **"fibonacci'yi derle ve çalıştır"** (`examples/fibonacci.sqt`). Faz 0–1
|
||||
> bunun önkoşuludur.
|
||||
>
|
||||
> 🧭 **Önce dikey dilim, sonra çerçeve.** Bir şey çalışmadan önce genel pass
|
||||
> manager / evrensel config / ağır soyutlama inşa etme. Uçtan uca tek bir dilim
|
||||
> (kaynak → IR → çalıştır; tamsayı + değişken + kontrol akışı + tek `print`)
|
||||
> önce çalışsın. Faz 4'ün framework'ü (OptimizationManager, fixpoint, config)
|
||||
> ancak Faz 0–3 fibonacci'yi geçirdikten **sonra** anlam kazanır — erken
|
||||
> soyutlama daha az değil, daha çok karmaşıklıktır.
|
||||
> **Sonraki hedefler:** float/double codegen, struct IR, array IR, açık bug'lar
|
||||
> (#35 bellek sızıntısı, #36 W003 uyarısı, #37 `%=` IR, #38 global değişken IR).
|
||||
> Güncel "çalışıyor / henüz yok" listesi için bkz. `CLAUDE.md`.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -46,7 +37,7 @@ Katman eşlemesi (ADR-006):
|
|||
|
||||
---
|
||||
|
||||
## Faz 0 — Temeller (Type + Diagnostic + Hata Kataloğu)
|
||||
## ✅ Faz 0 — Temeller (Type + Diagnostic + Hata Kataloğu) — TAMAMLANDI
|
||||
|
||||
**Bağımlılık:** yok. **Hedef:** her şeyin üstüne kurulacağı temel veri yapıları.
|
||||
İlgili ADR: 010 (Type), 013 (Diagnostic).
|
||||
|
|
@ -91,7 +82,7 @@ Katman eşlemesi (ADR-006):
|
|||
|
||||
---
|
||||
|
||||
## Faz 1 — AST Refactor (ExpressionNode / StatementNode + analiz alanları)
|
||||
## ✅ Faz 1 — AST Refactor (ExpressionNode / StatementNode + analiz alanları) — TAMAMLANDI
|
||||
|
||||
**Bağımlılık:** Faz 0 (Type). **Hedef:** node hiyerarşisini ifade/deyim olarak
|
||||
ayır, analiz alanlarını ekle. İlgili ADR: 012, 013.
|
||||
|
|
@ -116,7 +107,7 @@ ayır, analiz alanlarını ekle. İlgili ADR: 012, 013.
|
|||
|
||||
---
|
||||
|
||||
## Faz 2 — Symbol Table (scope'lu, iki-geçişli toplama)
|
||||
## ✅ Faz 2 — Symbol Table (scope'lu, iki-geçişli toplama) — TAMAMLANDI
|
||||
|
||||
**Bağımlılık:** Faz 0, 1. **Hedef:** isim çözümleme + scope + referans toplama.
|
||||
İlgili ADR: 011, 013.
|
||||
|
|
@ -150,7 +141,7 @@ ayır, analiz alanlarını ekle. İlgili ADR: 012, 013.
|
|||
|
||||
---
|
||||
|
||||
## Faz 3 — Semantic Analiz (Tip Kontrolü + Yapısal Doğrulama)
|
||||
## ✅ Faz 3 — Semantic Analiz (Tip Kontrolü + Yapısal Doğrulama) — TAMAMLANDI
|
||||
|
||||
**Bağımlılık:** Faz 2. **Hedef:** tipleri ata/kontrol et, yapısal kuralları
|
||||
doğrula. İlgili ADR: 010, 013.
|
||||
|
|
@ -173,7 +164,7 @@ doğrula. İlgili ADR: 010, 013.
|
|||
|
||||
---
|
||||
|
||||
## Faz 4 — Optimizasyon Framework
|
||||
## ✅ Faz 4 — Optimizasyon Framework — TAMAMLANDI
|
||||
|
||||
**Bağımlılık:** Faz 3. **Hedef:** opsiyonel, iteratif, toggle'lı kaynak-seviyesi
|
||||
optimizasyon. **Orijinali bozmaz — klon üstünde** (ADR-007). İlgili ADR: 007, 008, 009.
|
||||
|
|
|
|||
347
readme.md
347
readme.md
|
|
@ -1,225 +1,186 @@
|
|||
# saQut
|
||||
|
||||
**Programlanabilir, incelenebilir bir derleyici — bir "alet çantası" (toolbox).**
|
||||
> **A compiler built as a toolbox, not a black box —**
|
||||
> every internal phase is a first-class, inspectable output.
|
||||
|
||||
saQut'un asıl varlık sebebi dilin kendisinden çok, **derleme sürecinin her
|
||||
aşamasının dışarıdan görülebilir ve müdahale edilebilir olmasıdır.** Token'lar,
|
||||
AST, sembol tablosu, optimizasyonun öncesi/sonrası ve IR — hepsi ayrı ayrı
|
||||
incelenebilir. Dil, bu aletin üzerinde çalıştığı küçük, prosedürel bir
|
||||
örnektir; vitrin değil, alet.
|
||||
```
|
||||
saqut tokens file:fib.sqt → token stream, JSON
|
||||
saqut ast file:fib.sqt → full AST, JSON
|
||||
saqut ast file:fib.sqt --optimized → constant-folded + DCE'd AST
|
||||
saqut run file:fib.sqt → execute via IR + bytecode VM
|
||||
```
|
||||
|
||||
Uygulama dili **C++**'tır (header-only eğilimli, bkz. `docs/fikirler.md` ADR-003).
|
||||
Most compilers are black boxes. saQut is a **glass box.**
|
||||
|
||||
---
|
||||
|
||||
## Şu an ne çalışıyor, ne çalışmıyor
|
||||
## What is it?
|
||||
|
||||
Belgeler **planlanan** ile **yapılan**ı net ayırır. Bugünkü gerçek durum:
|
||||
saQut is a **procedural language compiler** written in C++.
|
||||
The language is small and C-flavoured on purpose — it is a vehicle, not the product.
|
||||
The product is **a compilation pipeline where every stage is named, queryable, and machine-readable.**
|
||||
|
||||
### ✅ Çalışıyor (built)
|
||||
- **Lexer** — karakter seviyesi tarama, konum takibi.
|
||||
- **Tokenizer** — token üretimi (6 token tipi), yorum satırı desteği.
|
||||
- **Pratt parser** — ifade (Pratt) + statement (recursive descent) ayrıştırma.
|
||||
- **AST** — fonksiyon, blok, değişken tanımı, if/for/while/do-while/return,
|
||||
ifade node'ları.
|
||||
- **AST'nin JSON serileştirmesi** — `saqut ast` ile incelenebilir.
|
||||
- **CLI komut yapısı** — `tokens`, `ast`, `symbols`, `run` iskeletleri.
|
||||
- **Kaynak konum takibi** (SourceLocation) — offset → (satır, sütun).
|
||||
- **Minimal IR deneyi** — basit aritmetiği düşürür (örn. `1 + (7/3)` → kısa
|
||||
doğrusal komut dizisi). Henüz tam bir backend değil, bir deneydir.
|
||||
|
||||
### 🚧 Henüz yok (planned)
|
||||
- Sembol tablosu
|
||||
- Semantik analiz
|
||||
- Tip sistemi
|
||||
- Diagnostic (hata raporlama) motoru
|
||||
- Optimizasyon
|
||||
- IR + bytecode VM ile çalıştırma
|
||||
|
||||
> `feature/frontend-analysis` dalı şu an yalnızca bu yapılmamış işin **tasarım
|
||||
> belgelerini** içerir, kodunu değil.
|
||||
|
||||
**Birinci kilometre taşı ("bitti" tanımı):** derleyici **fibonacci'yi**
|
||||
(recursive + iterative) ve basit matematik/döngü programlarını **derleyip
|
||||
çalıştırabilmeli.** Referans program: `examples/fibonacci.sqt`.
|
||||
You can pipe `saqut ast` into your own tool.
|
||||
You can hand the optimized AST diff to a review script.
|
||||
A stranger with no access to source could write an LSP from `saqut symbols` output alone.
|
||||
That is the test saQut is designed to pass.
|
||||
|
||||
---
|
||||
|
||||
## Dil kimliği (kilitli)
|
||||
## The language looks like this
|
||||
|
||||
Prosedürel, **C ailesi sözdizimi**, **value semantics**. İlk ifade doğrudan bir
|
||||
işlem/tanım olabilir; zorunlu class/`main` boilerplate'i yoktur (Java'nın aksine).
|
||||
```c
|
||||
int fibonacci(int n) {
|
||||
if (n <= 1) {
|
||||
return n;
|
||||
}
|
||||
return fibonacci(n - 1) + fibonacci(n - 2);
|
||||
}
|
||||
|
||||
| Özellik | Karar |
|
||||
int fibonacciIterative(int n) {
|
||||
int first = 0;
|
||||
int second = 1;
|
||||
for (int i = 0; i < n; i = i + 1) {
|
||||
int next = first + second;
|
||||
first = second;
|
||||
second = next;
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int n = 10;
|
||||
print(fibonacci(n));
|
||||
print(fibonacciIterative(n));
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
- No mandatory `class` / `main` boilerplate
|
||||
- Typed functions, `struct`, `int[]` arrays
|
||||
- `int`, `float`, `bool`, `string` literal types
|
||||
- Value semantics — no user-visible pointers
|
||||
- Single FFI seam (`callhost`) — the only door to the outside world
|
||||
|
||||
**Deliberately absent:** OOP, closures, generics, implicit int↔float coercion, `auto`.
|
||||
|
||||
---
|
||||
|
||||
## Build
|
||||
|
||||
**Requirements:** C++17, CMake ≥ 3.16, Ninja
|
||||
|
||||
```bash
|
||||
git clone https://github.com/abdussamedulutas/saqut
|
||||
cd saqut
|
||||
cmake -B build -G Ninja
|
||||
cmake --build build
|
||||
```
|
||||
|
||||
Binary lands at `build/saqut`.
|
||||
|
||||
**Tested on:** Linux (x86-64, Manjaro). macOS and Windows untested but no platform-specific code.
|
||||
|
||||
---
|
||||
|
||||
## CLI
|
||||
|
||||
| Command | What you get |
|
||||
|---|---|
|
||||
| Class / OOP / kalıtım | **Yok** |
|
||||
| Closure | **Yok** |
|
||||
| Generic | **Yok** |
|
||||
| Kullanıcıya açık pointer (`*` / `&`) | **Yok** — derleyici/runtime içeride pointer'ı serbestçe kullanır |
|
||||
| `struct` | **Var** |
|
||||
| Tipli fonksiyonlar (dönüş + parametre) | **Var** |
|
||||
| Array (`int[]`) | **Var** |
|
||||
| `interface` | **Ertelendi** (v0 değil — gerekçe ADR-018) |
|
||||
| `auto` / tip çıkarımı | **Yok** |
|
||||
| Gizli int↔float dönüşümü | **Yok** (tek istisna: sabit folding) |
|
||||
| `saqut tokens file:src.sqt` | Token stream with positions |
|
||||
| `saqut ast file:src.sqt` | Full AST as JSON |
|
||||
| `saqut ast file:src.sqt --optimized` | AST after constant folding + dead-code elimination |
|
||||
| `saqut symbols file:src.sqt` | Symbol table dump |
|
||||
| `saqut check file:src.sqt` | Semantic analysis only — errors and warnings, JSON |
|
||||
| `saqut ir file:src.sqt` | IR instruction dump |
|
||||
| `saqut run file:src.sqt` | Compile and run via bytecode VM |
|
||||
|
||||
Gerekçe: prosedürel tasarım semantik karmaşıklığı en aza indirir ve hedeflerle
|
||||
(fibonacci, matematik, sıralama, ayrıştırma) örtüşür. Standart C'de `class`
|
||||
yoktur (o C++'tır); C, struct + fonksiyonun yettiğini kanıtlar.
|
||||
Every output is designed to be piped, diffed, or consumed by other tools.
|
||||
|
||||
---
|
||||
|
||||
## Çalıştırma modeli (kilitli): IR + bytecode VM
|
||||
|
||||
saQut, kendi **IR**'sine derler ve bu IR'yi bir **yorumlayıcı döngü (bytecode
|
||||
VM)** ile çalıştırır.
|
||||
|
||||
- **Tree-walker DEĞİL** (çok yavaş).
|
||||
- **Gerçek makine-kodu JIT DEĞİL.** Makine kodu üretimi (register allocation,
|
||||
ABI/çağırma sözleşmeleri, çalıştırılabilir `mmap` bellek) **kapsam dışıdır** —
|
||||
tek faydası ham hızdır ve hız burada öncelik değildir. Öncelikler
|
||||
**determinizm** ve **incelenebilirliktir**; bytecode VM ikisini de doğrudan
|
||||
sağlar.
|
||||
- **Bellek bu modelde kolaydır:** host (C++) heap'i kullanılır; v0 için özel
|
||||
runtime allocator gerekmez.
|
||||
- **C'ye transpile, geçerli bir İKİNCİ backend olarak ileride kalır** (frontend
|
||||
backend-bağımsızdır — middle-end ayrımının amacı budur, ADR-006). İleride
|
||||
makine kodu istenirse elle code generator yazmak yerine **libgccjit / LLVM'e
|
||||
bağlanılır** — ama bu çok uzak gelecektir.
|
||||
|
||||
> Eski belge/konuşmalarda geçen "JIT" terimi yanlış yönlendiricidir; doğru
|
||||
> çerçeve **IR + VM**'dir.
|
||||
|
||||
---
|
||||
|
||||
## Tasarım felsefesi — neden saQut farklı?
|
||||
|
||||
saQut "daha iyi bir dil" iddiasında değil. Farkı, **derleyiciyi bir platform**
|
||||
olarak ele almasında. İki taahhüt üstüne kuruludur:
|
||||
|
||||
**1. Cam (gör + sorgula + içine müdahale et).** Her aşama — token, AST, sembol
|
||||
tablosu, tip, IR — kararlı, makine-okur ve **çift yönlü** bir arayüzden
|
||||
erişilebilir olmalıdır. Sadece "dök ve göster" değil: kendi AST'ini verip tip
|
||||
kontrolü isteyebilmeli, IR verip çalıştırabilmelisin. **Turnusol testi:** bir
|
||||
yabancı, yalnızca `saqut ast` + `saqut symbols` çıktısından, bizden habersiz bir
|
||||
LSP yazabiliyor mu? Cevap "evet" ise platform gerçektir.
|
||||
|
||||
**2. Kafes (deterministik + yetenek-güvenli çalıştırma).** Pointer yok, value
|
||||
semantics, scope-tabanlı bellek ve **tek dış-dünya kapısı olan FFI seam**
|
||||
(ADR-016) sayesinde saQut kodu, host'un açıkça izin verdiği fonksiyonlar dışında
|
||||
dünyaya dokunamaz. Bytecode VM deterministiktir (ADR-015): aynı girdi → aynı
|
||||
çıktı → aynı çalışma. "Sadelik" diye tasarlanan bu kararlar aslında bir
|
||||
**yetenek-güvenliği (capability sandbox)** kurar — güvenilmeyen veya
|
||||
AI-üretimi kodu güvenle çalıştırmak için biçilmiş kaftan.
|
||||
|
||||
**Bu ikisinin ödülü — kayıt & tekrar (record-replay).** 🚧 *(vizyon, v0 değil;
|
||||
bkz. issue #94.)* Belirsizliğin tek kaynağı (kullanıcı girdisi, zaman, IO,
|
||||
GC/thread kararları) FFI kapısından geçtiği için, mükemmel tekrar oynatma için
|
||||
**her değişkeni her adımda kaydetmek gerekmez** — yalnızca kapıdan geçen değerler
|
||||
kaydedilir, gerisi VM deterministik olarak yeniden çalıştırılarak üretilir. Boyut
|
||||
gigabayttan kilobayta düşer. Replay modunda FFI çağrıları gerçekten çalışmaz,
|
||||
kaydedilmiş değeri döndürür (dosyayı tekrar silmez, sunucuya tekrar istek atmaz).
|
||||
Böylece "benim makinemde çalışıyor, müşteride patlıyor" sorunu: müşteri bir dump
|
||||
yollar, sen çöküşü adım adım, aynı verilerle geri sararsın.
|
||||
|
||||
> Log, önceden sormayı akıl ettiğin sorulara cevap verir; **tekrar-oynatma,
|
||||
> çöküşten *sonra* aklına gelen sorulara.** Zaman-yolculuğu hata ayıklama ayrı
|
||||
> bir altyapı değildir — cam sorgularına bir **zaman koordinatı** eklemektir.
|
||||
|
||||
⚠️ Bu ödülün bedeli v0'da ödenir: **determinizm kutsaldır ve her belirsizlik
|
||||
kaynağı kayıt-altına-alınabilir tek kapıdan geçmelidir.** Sonradan eklenemez;
|
||||
baştan korunur.
|
||||
|
||||
---
|
||||
|
||||
## Mimari hatlar
|
||||
## Pipeline
|
||||
|
||||
```
|
||||
KAYNAK KOD
|
||||
│ lexer
|
||||
▼
|
||||
TOKEN'LAR ────────────── saqut tokens
|
||||
│ parser (Pratt + recursive descent)
|
||||
▼
|
||||
AST ──────────────────── saqut ast
|
||||
│ sembol toplama (iki geçişli) ┐
|
||||
▼ │
|
||||
SEMBOL TABLOSU ───────── saqut symbols │ FRONTEND
|
||||
│ semantik analiz (annotation) │ (yapı + anlam)
|
||||
▼ │
|
||||
ANNOTATE EDİLMİŞ AST ─── saqut ast ┘
|
||||
│ optimizasyon (opsiyonel, klon üstünde) ── MIDDLE-END
|
||||
▼
|
||||
IR ───────────────────── (planlanan) ┐
|
||||
│ bytecode VM / yorumlayıcı döngü │ BACKEND
|
||||
▼ │ (çalıştırma + FFI seam)
|
||||
ÇALIŞTIRMA / ÇIKTI ───── saqut run ┘
|
||||
Source
|
||||
│ Lexer + Tokenizer
|
||||
▼
|
||||
Tokens ──────────────────── saqut tokens
|
||||
│ Pratt parser + recursive descent
|
||||
▼
|
||||
AST ─────────────────────── saqut ast
|
||||
│ Symbol collector (two-pass)
|
||||
▼
|
||||
Symbol Table ────────────── saqut symbols
|
||||
│ Type checker + structural validator
|
||||
▼
|
||||
Annotated AST
|
||||
│ Optimization Manager (clone — original untouched)
|
||||
│ ├─ Constant Folding pass
|
||||
│ └─ Dead Code Elimination pass
|
||||
▼
|
||||
Optimized AST ───────────── saqut ast --optimized
|
||||
│ IR Generator
|
||||
▼
|
||||
IR ──────────────────────── saqut ir
|
||||
│ Bytecode VM (interpreter loop)
|
||||
▼
|
||||
Output ──────────────────── saqut run
|
||||
```
|
||||
|
||||
- **Frontend** yapıyı ve anlamı modeller (tip, scope, dataflow).
|
||||
- **"Hangi çekirdek, hangi cihaz, ne zaman, hangi çıktı formatı"** runtime/backend
|
||||
meselesidir — frontend'e yüklenmez.
|
||||
The optimizer works on a **clone** of the AST — the original is preserved.
|
||||
Constant folding and DCE run in a fixpoint loop until nothing changes.
|
||||
|
||||
---
|
||||
|
||||
## CLI (mevcut + planlanan)
|
||||
## What works right now
|
||||
|
||||
```
|
||||
# --- çalışıyor ---
|
||||
saqut tokens file:kaynak.sqt # token listesi
|
||||
saqut ast file:kaynak.sqt # AST (JSON)
|
||||
saqut symbols file:kaynak.sqt # sembol tablosu (iskelet)
|
||||
|
||||
# --- planlanan ---
|
||||
saqut run file:kaynak.sqt # IR üret + bytecode VM ile çalıştır
|
||||
saqut ast file:kaynak.sqt --optimized # klon, optimize edilmiş AST (öncesi/sonrası)
|
||||
saqut transpile file:kaynak.sqt -o prog.c # ikinci backend (ileride)
|
||||
```
|
||||
|
||||
Tasarım gereği her aşamanın çıktısı erken bir noktada dosyalanabilir/loglanabilir
|
||||
(programlanabilir derleyici). Token, ham AST, optimize AST ve IR ayrı ayrı
|
||||
kaydedilebilir.
|
||||
|
||||
---
|
||||
|
||||
## Batteries / stdlib — kuzey yıldızı, ertelendi
|
||||
|
||||
Gerçek bir genel sürüm pil ile gelmeli (sıralama, sıkıştırma, kripto,
|
||||
JSON/XML/HTML ayrıştırma). Ama bu **bugünün işi ve v0.1 değildir.**
|
||||
|
||||
Mimari çerçeve (monolit korkusunu önler): derleyici pilleri çekirdeğine
|
||||
gömmez. Bunun yerine **küçük bir gerçek builtin kümesi** (`print`, temel
|
||||
zorunlular) + **gerisi kütüphane/FFI** ile gelir. "Batteries" sorunu aslında
|
||||
bir **sınır (FFI/link seam) sorunudur**, "zlib'i yeniden yaz" sorunu değil.
|
||||
Sınır bir kez çizilir, piller üstünde sonsuza dek birikir.
|
||||
|
||||
- **JSON/XML/HTML ayrıştırıcıları saQut'un kendisinde yazılabilir** (string +
|
||||
struct + fonksiyon + kontrol akışı yeter). İlk gerçek demo programları.
|
||||
- **Sıkıştırma/kripto:** denenmiş C kütüphanelerine FFI ile bağlan. **Kripto
|
||||
asla elle yazılmaz.**
|
||||
- **Bugüne tek yansıması:** IR/runtime tasarlanırken **bilinçli bir FFI seam**
|
||||
("host fonksiyonu çağır" deliği) bırakılır. `print` bunu zaten zorlar — bunu
|
||||
kaza değil, **kasıtlı bir mekanizma** yapıyoruz (ADR-016).
|
||||
|
||||
---
|
||||
|
||||
## Belge haritası
|
||||
|
||||
| Belge | İçerik |
|
||||
| Stage | Status |
|
||||
|---|---|
|
||||
| `docs/fikirler.md` | ADR-001…005: backend stratejisi, parser, header-only, token, IR |
|
||||
| `docs/adr-frontend-analiz.md` | ADR-006…019: frontend, analiz/optimizasyon, çalıştırma modeli, FFI, interface, bellek |
|
||||
| `docs/roadmap-frontend.md` | Faz-faz uygulama planı (sembol tablosu → fibonacci) |
|
||||
| `docs/transkript-frontend-tasarim.md` | Tasarım oturumunun transkripti |
|
||||
| `examples/fibonacci.sqt` | Geçerli referans program (semantik + kod üretimi fixture'ı) |
|
||||
| `examples/parser-stress/` | Yalnızca parser'ı zorlayan, **geçerli olmayan** fixture'lar |
|
||||
| Lexer / Tokenizer | ✅ |
|
||||
| Pratt parser | ✅ |
|
||||
| AST + JSON serialization | ✅ |
|
||||
| Symbol table (two-pass collector) | ✅ |
|
||||
| Type checker | ✅ |
|
||||
| Structural validator | ✅ |
|
||||
| Constant folding (int, bool, logical, unary) | ✅ |
|
||||
| Dead code elimination | ✅ |
|
||||
| IR generator + bytecode VM | ✅ |
|
||||
| `saqut run` executes fibonacci | ✅ |
|
||||
| `string` type | ✅ |
|
||||
| `struct` | 🚧 |
|
||||
| `int[]` arrays | 🚧 |
|
||||
| Standard library / FFI beyond `print` | 🚧 |
|
||||
|
||||
---
|
||||
|
||||
## İlke
|
||||
## Philosophy in two sentences
|
||||
|
||||
Bir şey çalışmadan önce çerçeve inşa etmekten kaçın. Önce **uçtan uca tek bir
|
||||
dikey dilim** çalıştır (kaynak → IR → çalıştır; tamsayı aritmetiği + değişken +
|
||||
kontrol akışı + tek bir `print`). Modülerlik bir kuzey yıldızıdır, v0.1
|
||||
gereksinimi değil; ihtiyaç doğmadan eklenen her soyutlama **daha az değil, daha
|
||||
çok** karmaşıklıktır.
|
||||
**Glass:** every compilation stage is a stable, queryable output — tokens, AST, symbols, IR — all separately inspectable and pipeable.
|
||||
**Cage:** no user pointers, value semantics, single FFI door — the VM is deterministic, which makes record-replay and time-travel debugging a natural extension, not an afterthought.
|
||||
|
||||
The long version is in [`docs/architecture.md`](docs/architecture.md).
|
||||
|
||||
---
|
||||
|
||||
## Design records
|
||||
|
||||
Architectural decisions live in `docs/`:
|
||||
|
||||
| File | Coverage |
|
||||
|---|---|
|
||||
| [`docs/fikirler.md`](docs/fikirler.md) | ADR-001–005: backend strategy, parser, header-only, token, IR |
|
||||
| [`docs/adr-frontend-analiz.md`](docs/adr-frontend-analiz.md) | ADR-006–019: analysis, optimization, execution model, FFI, memory |
|
||||
| [`docs/roadmap-frontend.md`](docs/roadmap-frontend.md) | Phase-by-phase implementation plan |
|
||||
| [`docs/architecture.md`](docs/architecture.md) | Full architecture reference (Turkish) |
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
Source-available, commercial use restricted.
|
||||
Free for: personal use, learning, writing and running saQut programs, internal tooling.
|
||||
Requires permission for: hosting as a service, embedding sub-components commercially, redistributing as a product.
|
||||
|
||||
See [`LICENSE.md`](LICENSE.md) for the full terms.
|
||||
Commercial licensing: saqutsoftware+gitea@gmail.com
|
||||
|
|
|
|||
|
|
@ -7,8 +7,12 @@
|
|||
#include "parser/parser.hpp"
|
||||
#include "symbol/symbol_table.hpp"
|
||||
#include "symbol/symbol_collector.hpp"
|
||||
#include "semantic/type_checker.hpp"
|
||||
#include "semantic/structural_validator.hpp"
|
||||
#include "diagnostic/diagnostic_engine.hpp"
|
||||
#include "ir/ir_generator.hpp"
|
||||
#include "core/config.hpp"
|
||||
#include "opt/optimization_manager.hpp"
|
||||
|
||||
inline int cmdIr(const CliArgs& args) {
|
||||
std::string filePath = inputFilePath(args);
|
||||
|
|
@ -29,6 +33,8 @@ inline int cmdIr(const CliArgs& args) {
|
|||
SymbolTable symbolTable;
|
||||
DiagnosticEngine diag;
|
||||
SymbolCollector(symbolTable, diag).collect(ast);
|
||||
TypeChecker(symbolTable, diag).check(ast);
|
||||
StructuralValidator(diag).validate(ast);
|
||||
|
||||
if (diag.hasErrors()) {
|
||||
diag.printAll(std::cerr);
|
||||
|
|
@ -37,9 +43,18 @@ inline int cmdIr(const CliArgs& args) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
// --optimized: constant folding + DCE yerinde uygulanır, klon yok.
|
||||
// IR dump için tek versiyon yeterli — ast komutu gibi karşılaştırma yok.
|
||||
if (args.optimized) {
|
||||
CompilerConfig cfg;
|
||||
DiagnosticEngine optDiag;
|
||||
OptimizationManager(cfg, optDiag).runPassesInPlace(ast, &symbolTable);
|
||||
if (optDiag.errorCount() + optDiag.warningCount() > 0)
|
||||
optDiag.printAll(std::cerr); // W002 vb. uyarılar stderr'e
|
||||
}
|
||||
|
||||
IRGenerator irGenerator;
|
||||
IRProgram program = irGenerator.generate(ast, symbolTable);
|
||||
|
||||
program.dump();
|
||||
|
||||
delete ast;
|
||||
|
|
|
|||
|
|
@ -2,12 +2,11 @@
|
|||
// saQut CLI — run komutu
|
||||
//
|
||||
// Tam derleme + çalıştırma pipeline'ı:
|
||||
// tokenize → parse → sembol topla → IR üret → VM çalıştır
|
||||
// tokenize → parse → sembol topla → [opsiyonel: optimize] → IR üret → VM çalıştır
|
||||
//
|
||||
// Başarı kriteri:
|
||||
// build/saqut run file:examples/fibonacci.sqt
|
||||
// → 55
|
||||
// → 55
|
||||
// --optimized bayrağı: AST yerinde optimize edilir (klon yok — sadece tek versiyon
|
||||
// gerekiyor). ast komutu orijinali saklaması gerektiği için klon kullanır; run/ir
|
||||
// kullanmaz. Aynı pattern ir.hpp'de de var — paralel değişikliklerde ikisine bak.
|
||||
// ============================================================================
|
||||
|
||||
#ifndef SAQUT_CLI_RUN
|
||||
|
|
@ -22,6 +21,8 @@
|
|||
#include "semantic/type_checker.hpp"
|
||||
#include "semantic/structural_validator.hpp"
|
||||
#include "diagnostic/diagnostic_engine.hpp"
|
||||
#include "core/config.hpp"
|
||||
#include "opt/optimization_manager.hpp"
|
||||
#include "ir/ir_generator.hpp"
|
||||
#include "vm/interpreter.hpp"
|
||||
|
||||
|
|
@ -43,7 +44,7 @@ inline int cmdRun(const CliArgs& args) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
// ── Aşama 3: Sembol toplama ───────────────────────────────────────────
|
||||
// ── Aşama 3: Sembol toplama + semantik analiz ─────────────────────────
|
||||
// Identifier'ların resolvedSymbol'ü doldurulur — IR generator buna ihtiyaç duyar.
|
||||
SymbolTable symbolTable;
|
||||
DiagnosticEngine diag;
|
||||
|
|
@ -59,11 +60,22 @@ inline int cmdRun(const CliArgs& args) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
// ── Aşama 4: IR üretimi ───────────────────────────────────────────────
|
||||
// ── Aşama 4 (opsiyonel): Optimizasyon ────────────────────────────────
|
||||
// --optimized: constant folding + DCE yerinde uygulanır, klon yok.
|
||||
// Tek versiyon (optimize edilmiş) yeterli — ast komutu gibi karşılaştırma yok.
|
||||
if (args.optimized) {
|
||||
CompilerConfig cfg;
|
||||
DiagnosticEngine optDiag;
|
||||
OptimizationManager(cfg, optDiag).runPassesInPlace(ast, &symbolTable);
|
||||
if (optDiag.errorCount() + optDiag.warningCount() > 0)
|
||||
optDiag.printAll(std::cerr); // W002 (derleme zamanı sıfıra bölme) vb.
|
||||
}
|
||||
|
||||
// ── Aşama 5: IR üretimi ───────────────────────────────────────────────
|
||||
IRGenerator irGenerator;
|
||||
IRProgram program = irGenerator.generate(ast, symbolTable);
|
||||
|
||||
// ── Aşama 5: VM çalıştırma ────────────────────────────────────────────
|
||||
// ── Aşama 6: VM çalıştırma ────────────────────────────────────────────
|
||||
int exitCode = 0;
|
||||
try {
|
||||
Interpreter vm(program);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
// LESS/LEQ/... : dest, left, right (sonuç: 1=doğru, 0=yanlış)
|
||||
// JMP : jumpTarget
|
||||
// JIF_FALSE : cond, jumpTarget
|
||||
// JIF_TRUE : cond, jumpTarget
|
||||
// CALL : dest, functionName, argSlots
|
||||
// RETURN : src
|
||||
// CALLHOST : functionName, argSlots
|
||||
|
|
@ -64,7 +65,8 @@ enum class Opcode {
|
|||
|
||||
// --- Kontrol akışı ---
|
||||
JMP, // Koşulsuz atlama: ip = jumpTarget
|
||||
JIF_FALSE, // Koşullu atlama: slots[cond] == 0 ise ip = jumpTarget
|
||||
JIF_FALSE, // Koşullu atlama: slots[cond] falsy ise ip = jumpTarget
|
||||
JIF_TRUE, // Koşullu atlama: slots[cond] truthy ise ip = jumpTarget
|
||||
|
||||
// --- Fonksiyon çağrısı ---
|
||||
CALL, // Başka bir saQut fonksiyonunu çağır.
|
||||
|
|
@ -97,6 +99,7 @@ inline const char* opcodeName(Opcode op) {
|
|||
case Opcode::NOT_EQUAL: return "NOT_EQUAL";
|
||||
case Opcode::JMP: return "JMP";
|
||||
case Opcode::JIF_FALSE: return "JIF_FALSE";
|
||||
case Opcode::JIF_TRUE: return "JIF_TRUE";
|
||||
case Opcode::CALL: return "CALL";
|
||||
case Opcode::RETURN: return "RETURN";
|
||||
case Opcode::CALLHOST: return "CALLHOST";
|
||||
|
|
|
|||
|
|
@ -153,84 +153,101 @@ void IRGenerator::generateStatement(ASTNode* node) {
|
|||
case ASTKind::WhileStatement: {
|
||||
auto* ws = (WhileStatementNode*)node;
|
||||
|
||||
// Döngü başının konumu — geri-jump buraya gelecek
|
||||
int loopStart = currentInstrIndex();
|
||||
loopContextStack_.push_back({});
|
||||
|
||||
int condSlot = generateExpression(ws->condition);
|
||||
int exitJump = emitJumpIfFalse(condSlot); // ileri, backpatch bekliyor
|
||||
int condSlot = generateExpression(ws->condition);
|
||||
int exitJump = emitJumpIfFalse(condSlot);
|
||||
|
||||
if (ws->body) generateStatement(ws->body);
|
||||
|
||||
// Geri-jump: hedef zaten biliniyor (loopStart)
|
||||
emitJumpUnconditional(loopStart);
|
||||
// continue → LOOP_START (hedef baştan beri biliniyor)
|
||||
for (int idx : loopContextStack_.back().continueJumps)
|
||||
currentFunction_->instructions[idx].jumpTarget = loopStart;
|
||||
|
||||
// Döngü çıkış noktası → exitJump'ı doldur
|
||||
patchJump(exitJump);
|
||||
emitJumpUnconditional(loopStart);
|
||||
patchJump(exitJump); // OUT burası
|
||||
|
||||
// break → OUT
|
||||
int outTarget = currentInstrIndex();
|
||||
for (int idx : loopContextStack_.back().breakJumps)
|
||||
currentFunction_->instructions[idx].jumpTarget = outTarget;
|
||||
|
||||
loopContextStack_.pop_back();
|
||||
break;
|
||||
}
|
||||
|
||||
// ── for (init; koşul; güncelleme) { gövde } ─────────────────────────
|
||||
//
|
||||
// Üretilen IR yapısı:
|
||||
// IR yapısı (continue C_LABEL'a, break OUT'a atlar):
|
||||
// [init]
|
||||
// LOOP_START:
|
||||
// [koşul] → condSlot
|
||||
// JIF_FALSE condSlot → LOOP_END (ileri-jump, backpatch)
|
||||
// [koşul] → JIF_FALSE OUT
|
||||
// [gövde]
|
||||
// C_LABEL:
|
||||
// [güncelleme]
|
||||
// JMP → LOOP_START (geri-jump, hedef biliniyor)
|
||||
// LOOP_END:
|
||||
// JMP LOOP_START
|
||||
// OUT:
|
||||
// ─────────────────────────────────────────────────────────────────────
|
||||
case ASTKind::ForStatement: {
|
||||
auto* fs = (ForStatementNode*)node;
|
||||
|
||||
// Init: genellikle "int i = 0" gibi bir VariableDecl
|
||||
if (fs->init) generateStatement(fs->init);
|
||||
|
||||
// Döngü başı konumu — geri-jump'ın hedefi
|
||||
int loopStart = currentInstrIndex();
|
||||
loopContextStack_.push_back({});
|
||||
|
||||
// Koşul
|
||||
int condSlot = fs->condition ? generateExpression(fs->condition) : -1;
|
||||
int exitJump = (condSlot != -1) ? emitJumpIfFalse(condSlot) : -1;
|
||||
|
||||
// Gövde
|
||||
if (fs->body) generateStatement(fs->body);
|
||||
|
||||
// Güncelleme (ör: i = i + 1) — ifade deyimi, sonuç önemsiz
|
||||
// C_LABEL: güncelleme başlangıcı — continue buraya atlar
|
||||
int cLabel = currentInstrIndex();
|
||||
for (int idx : loopContextStack_.back().continueJumps)
|
||||
currentFunction_->instructions[idx].jumpTarget = cLabel;
|
||||
|
||||
if (fs->update) generateExpression(fs->update);
|
||||
|
||||
// Geri-jump: hedef loopStart, zaten biliniyor
|
||||
emitJumpUnconditional(loopStart);
|
||||
|
||||
// Döngü çıkışı → exitJump'ı doldur
|
||||
if (exitJump != -1) patchJump(exitJump);
|
||||
if (exitJump != -1) patchJump(exitJump); // OUT burası
|
||||
|
||||
// break → OUT
|
||||
int outTarget = currentInstrIndex();
|
||||
for (int idx : loopContextStack_.back().breakJumps)
|
||||
currentFunction_->instructions[idx].jumpTarget = outTarget;
|
||||
|
||||
loopContextStack_.pop_back();
|
||||
break;
|
||||
}
|
||||
|
||||
// ── do { gövde } while (koşul) ───────────────────────────────────────
|
||||
case ASTKind::DoWhileStatement: {
|
||||
auto* dw = (DoWhileStatementNode*)node;
|
||||
|
||||
int loopStart = currentInstrIndex();
|
||||
loopContextStack_.push_back({});
|
||||
|
||||
if (dw->body) generateStatement(dw->body);
|
||||
|
||||
// COND_LABEL: koşul değerlendirmesi — continue buraya atlar
|
||||
int condLabel = currentInstrIndex();
|
||||
for (int idx : loopContextStack_.back().continueJumps)
|
||||
currentFunction_->instructions[idx].jumpTarget = condLabel;
|
||||
|
||||
int condSlot = generateExpression(dw->condition);
|
||||
// Koşul doğruysa geri atla (1 = doğru → atla; 0 = yanlış → devam)
|
||||
// JIF_FALSE koşul yanlışsa atlar; biz doğruysa atlamak istiyoruz.
|
||||
// Bu yüzden JIF_FALSE yerine "doğruysa atla" mantığı lazım.
|
||||
// Basit çözüm: koşulun tersini al (0→1, diğer→0) ve JIF_FALSE kullan.
|
||||
// NOT: saQut'ta "!" operatörü yok henüz; NOT talimatı eklenebilir.
|
||||
// Şimdilik: koşul slotuna bak, sıfır değilse geri atla.
|
||||
// TODO(vm-genişletme): JIF_TRUE talimatı ekle
|
||||
// Geçici çözüm: sabit 1 ile karşılaştır (condSlot != 0 → geri)
|
||||
int oneSlot = freshSlot();
|
||||
emitLoadConst(oneSlot, 1);
|
||||
int eqSlot = freshSlot();
|
||||
emitBinaryOp(Opcode::EQUAL_EQUAL, eqSlot, condSlot, oneSlot);
|
||||
int skipJump = emitJumpIfFalse(eqSlot); // koşul yanlışsa döngüden çık
|
||||
emitJumpUnconditional(loopStart); // geri atla
|
||||
patchJump(skipJump);
|
||||
Instruction jit(Opcode::JIF_TRUE);
|
||||
jit.cond = condSlot;
|
||||
jit.jumpTarget = loopStart;
|
||||
currentFunction_->instructions.push_back(std::move(jit));
|
||||
|
||||
// break → OUT (JIF_TRUE'dan sonraki konum)
|
||||
int outTarget = currentInstrIndex();
|
||||
for (int idx : loopContextStack_.back().breakJumps)
|
||||
currentFunction_->instructions[idx].jumpTarget = outTarget;
|
||||
|
||||
loopContextStack_.pop_back();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -244,10 +261,18 @@ void IRGenerator::generateStatement(ASTNode* node) {
|
|||
break;
|
||||
}
|
||||
|
||||
case ASTKind::BreakStatement:
|
||||
case ASTKind::ContinueStatement:
|
||||
// TODO(vm-genişletme): break/continue için JMP + label mekanizması gerekir
|
||||
case ASTKind::BreakStatement: {
|
||||
int jumpIdx = emitJumpUnconditional(-1);
|
||||
if (!loopContextStack_.empty())
|
||||
loopContextStack_.back().breakJumps.push_back(jumpIdx);
|
||||
break;
|
||||
}
|
||||
case ASTKind::ContinueStatement: {
|
||||
int jumpIdx = emitJumpUnconditional(-1);
|
||||
if (!loopContextStack_.empty())
|
||||
loopContextStack_.back().continueJumps.push_back(jumpIdx);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
@ -271,13 +296,19 @@ int IRGenerator::generateExpression(ASTNode* node) {
|
|||
switch (lit->literalType) {
|
||||
case LiteralType::INTEGER: {
|
||||
int value = 0;
|
||||
if (lit->parserToken.token)
|
||||
if (lit->hasDirectValue)
|
||||
value = lit->directIntValue;
|
||||
else if (lit->parserToken.token)
|
||||
value = std::stoi(lit->parserToken.token->token);
|
||||
emitLoadConst(slot, value);
|
||||
break;
|
||||
}
|
||||
case LiteralType::BOOLEAN: {
|
||||
int value = (lit->parserToken.token &&
|
||||
int value = 0;
|
||||
if (lit->hasDirectValue)
|
||||
value = lit->directIntValue ? 1 : 0;
|
||||
else
|
||||
value = (lit->parserToken.token &&
|
||||
lit->parserToken.token->token == "true") ? 1 : 0;
|
||||
emitLoadConst(slot, value);
|
||||
break;
|
||||
|
|
@ -345,12 +376,13 @@ int IRGenerator::generateExpression(ASTNode* node) {
|
|||
return varSlot;
|
||||
}
|
||||
|
||||
// Birleşik atama: += -= *= /=
|
||||
// x += y ≡ x = x + y
|
||||
if (bin->Operator == TokenType::PLUS_EQUAL ||
|
||||
bin->Operator == TokenType::MINUS_EQUAL ||
|
||||
bin->Operator == TokenType::STAR_EQUAL ||
|
||||
bin->Operator == TokenType::SLASH_EQUAL) {
|
||||
// Birleşik atama: += -= *= /= %=
|
||||
// x OP= y ≡ x = x OP y
|
||||
if (bin->Operator == TokenType::PLUS_EQUAL ||
|
||||
bin->Operator == TokenType::MINUS_EQUAL ||
|
||||
bin->Operator == TokenType::STAR_EQUAL ||
|
||||
bin->Operator == TokenType::SLASH_EQUAL ||
|
||||
bin->Operator == TokenType::PERCENT_EQUAL) {
|
||||
|
||||
auto* lhsId = (IdentifierNode*)bin->Left;
|
||||
std::string varName = lhsId->parserToken.token->token;
|
||||
|
|
@ -358,9 +390,10 @@ int IRGenerator::generateExpression(ASTNode* node) {
|
|||
int rhsSlot = generateExpression(bin->Right);
|
||||
|
||||
Opcode arithOp = Opcode::ADD;
|
||||
if (bin->Operator == TokenType::MINUS_EQUAL) arithOp = Opcode::SUB;
|
||||
else if (bin->Operator == TokenType::STAR_EQUAL) arithOp = Opcode::MUL;
|
||||
else if (bin->Operator == TokenType::SLASH_EQUAL) arithOp = Opcode::DIV;
|
||||
if (bin->Operator == TokenType::MINUS_EQUAL) arithOp = Opcode::SUB;
|
||||
else if (bin->Operator == TokenType::STAR_EQUAL) arithOp = Opcode::MUL;
|
||||
else if (bin->Operator == TokenType::SLASH_EQUAL) arithOp = Opcode::DIV;
|
||||
else if (bin->Operator == TokenType::PERCENT_EQUAL) arithOp = Opcode::MOD;
|
||||
|
||||
int resultSlot = freshSlot();
|
||||
emitBinaryOp(arithOp, resultSlot, varSlot, rhsSlot);
|
||||
|
|
@ -378,8 +411,13 @@ int IRGenerator::generateExpression(ASTNode* node) {
|
|||
int zeroSlot = freshSlot();
|
||||
emitLoadConst(zeroSlot, 0);
|
||||
emitBinaryOp(Opcode::SUB, resultSlot, zeroSlot, operandSlot);
|
||||
} else if (bin->Operator == TokenType::BANG) {
|
||||
// !x → (x == 0): sıfırsa 1, değilse 0 — her zaman 0 ya da 1
|
||||
int zeroSlot = freshSlot();
|
||||
emitLoadConst(zeroSlot, 0);
|
||||
emitBinaryOp(Opcode::EQUAL_EQUAL, resultSlot, operandSlot, zeroSlot);
|
||||
} else {
|
||||
// Diğer unary operatörler → TODO
|
||||
// Diğer unary operatörler (ör. ~) → TODO
|
||||
emitLoadSlot(resultSlot, operandSlot);
|
||||
}
|
||||
return resultSlot;
|
||||
|
|
@ -399,6 +437,30 @@ int IRGenerator::generateExpression(ASTNode* node) {
|
|||
case TokenType::GREATER_EQUAL: return generateBinaryArithmetic(Opcode::GREATER_EQUAL, bin->Left, bin->Right);
|
||||
case TokenType::EQUAL_EQUAL: return generateBinaryArithmetic(Opcode::EQUAL_EQUAL, bin->Left, bin->Right);
|
||||
case TokenType::BANG_EQUAL: return generateBinaryArithmetic(Opcode::NOT_EQUAL, bin->Left, bin->Right);
|
||||
|
||||
// Mantıksal operatörler: kısa devre dallanmasıyla üretilir (ADR-008).
|
||||
// NOT: sıradan ikili işlem değil — b, a'nın değerine göre atlanabilir.
|
||||
case TokenType::AMPERSAND_AMPERSAND: {
|
||||
int slotA = generateExpression(bin->Left);
|
||||
int result = freshSlot();
|
||||
emitLoadConst(result, 0); // varsayılan: false
|
||||
int skipB = emitJumpIfFalse(slotA); // a false → b'yi atla
|
||||
int slotB = generateExpression(bin->Right);
|
||||
emitLoadSlot(result, slotB); // result = b
|
||||
patchJump(skipB);
|
||||
return result;
|
||||
}
|
||||
case TokenType::PIPE_PIPE: {
|
||||
int slotA = generateExpression(bin->Left);
|
||||
int result = freshSlot();
|
||||
emitLoadConst(result, 1); // varsayılan: true
|
||||
int skipB = emitJumpIfTrue(slotA); // a true → b'yi atla
|
||||
int slotB = generateExpression(bin->Right);
|
||||
emitLoadSlot(result, slotB); // result = b
|
||||
patchJump(skipB);
|
||||
return result;
|
||||
}
|
||||
|
||||
default: {
|
||||
// Bilinmeyen operatör — boş slot döndür
|
||||
int slot = freshSlot();
|
||||
|
|
@ -557,7 +619,14 @@ int IRGenerator::emitJumpIfFalse(int condSlot) {
|
|||
ins.cond = condSlot;
|
||||
ins.jumpTarget = -1; // henüz bilinmiyor — patchJump() bekliyor
|
||||
currentFunction_->instructions.push_back(std::move(ins));
|
||||
// Bu instruction'ın indeksini döndür (backpatch için)
|
||||
return (int)currentFunction_->instructions.size() - 1;
|
||||
}
|
||||
|
||||
int IRGenerator::emitJumpIfTrue(int condSlot) {
|
||||
Instruction ins(Opcode::JIF_TRUE);
|
||||
ins.cond = condSlot;
|
||||
ins.jumpTarget = -1;
|
||||
currentFunction_->instructions.push_back(std::move(ins));
|
||||
return (int)currentFunction_->instructions.size() - 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,12 +66,24 @@ private:
|
|||
// Döndürülen indeks ileride patchJump() ile doldurulur (backpatch).
|
||||
int emitJumpIfFalse(int condSlot);
|
||||
|
||||
// JIF_TRUE talimatını -1 hedefle yazar, instruction indeksini döndürür.
|
||||
int emitJumpIfTrue(int condSlot);
|
||||
|
||||
// Daha önce -1 hedefle yazılan jump'ın hedefini şu anki pozisyona doldur.
|
||||
void patchJump(int instrIndex);
|
||||
|
||||
// Şu an kaç talimat üretildi? (jump hedefi belirlemek için)
|
||||
int currentInstrIndex() const;
|
||||
|
||||
// ── Döngü bağlamı yığını — break/continue hedefleri ─────────────────
|
||||
// Her döngüye girerken bir giriş push'lanır, çıkınca pop'lanır.
|
||||
// İç içe döngülerde en üstteki giriş en içteki döngüye aittir.
|
||||
struct LoopContext {
|
||||
std::vector<int> breakJumps; // patch bekleyen break JMP indeksleri
|
||||
std::vector<int> continueJumps; // patch bekleyen continue JMP indeksleri
|
||||
};
|
||||
std::vector<LoopContext> loopContextStack_;
|
||||
|
||||
// ── Per-function üretim durumu ────────────────────────────────────────
|
||||
IRFunction* currentFunction_ = nullptr; // şu an üretilen fonksiyon
|
||||
int nextSlot_ = 0; // sıradaki boş slot numarası
|
||||
|
|
|
|||
|
|
@ -15,9 +15,12 @@
|
|||
#include "parser/nodes/declarations.hpp"
|
||||
#include "parser/nodes/expressions.hpp"
|
||||
#include "parser/nodes/program.hpp"
|
||||
#include "diagnostic/diagnostic_engine.hpp"
|
||||
|
||||
class DeadCodeElimPass : public OptimizationPass {
|
||||
public:
|
||||
explicit DeadCodeElimPass(DiagnosticEngine& diag) : diag_(diag) {}
|
||||
|
||||
bool run(ASTNode* root, SymbolTable*) override {
|
||||
changed_ = false;
|
||||
visit(root);
|
||||
|
|
@ -30,6 +33,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
DiagnosticEngine& diag_;
|
||||
bool changed_ = false;
|
||||
|
||||
void visit(ASTNode* node) {
|
||||
|
|
@ -45,11 +49,12 @@ private:
|
|||
|
||||
for (auto* child : ch) {
|
||||
if (term) {
|
||||
// Bu deyim erişilemez
|
||||
if (auto* sn = dynamic_cast<StatementNode*>(child)) {
|
||||
if (sn->isReachable) {
|
||||
sn->isReachable = false;
|
||||
changed_ = true;
|
||||
diag_.report("W003", sn->loc,
|
||||
"Bu kod hiçbir zaman çalışmaz (return/break/continue sonrası)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -59,12 +64,14 @@ private:
|
|||
term = true;
|
||||
}
|
||||
|
||||
// Erişilemez çocukları sil ve vektörden çıkar
|
||||
ch.erase(std::remove_if(ch.begin(), ch.end(),
|
||||
// remove_if erişilemez düğümleri sona taşır (silmez), sonra delete
|
||||
auto toErase = std::remove_if(ch.begin(), ch.end(),
|
||||
[](ASTNode* n) {
|
||||
auto* sn = dynamic_cast<StatementNode*>(n);
|
||||
return sn && !sn->isReachable;
|
||||
}), ch.end());
|
||||
});
|
||||
for (auto it = toErase; it != ch.end(); ++it) delete *it;
|
||||
ch.erase(toErase, ch.end());
|
||||
|
||||
// Alt bloklara da in
|
||||
for (auto* child : ch) visit(child);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,18 @@
|
|||
// ============================================================================
|
||||
// saQut — Optimizasyon Yöneticisi (ADR-007, ADR-009)
|
||||
//
|
||||
// 1. AST'yi klonlar (orijinal dokunulmaz).
|
||||
// 2. Etkin pass'leri fixpoint döngüsüyle çalıştırır.
|
||||
// 3. Optimize edilmiş klon sahipliğini döndürür (caller delete eder).
|
||||
// İKİ KULLANIM YOLU:
|
||||
//
|
||||
// 1. runPassesInPlace(root, table)
|
||||
// Pass'leri verilen AST üstünde doğrudan çalıştırır — klon yok.
|
||||
// run / ir / transpile gibi "tek seferlik" komutlar bu yolu kullanır:
|
||||
// AST'nin tek versiyonu gerekiyor, orijinali saklamaya gerek yok.
|
||||
//
|
||||
// 2. optimize(root, table) [sadece ast komutu için]
|
||||
// Önce deepClone, sonra runPassesInPlace. Orijinali dokunulmaz bırakır.
|
||||
// Çıktı: optimize edilmiş klon (caller delete eder).
|
||||
// ast komutunun "öncesi / sonrası" karşılaştırması için zorunlu.
|
||||
// Diğer komutlar bu yolu ÇAĞIRMAMALI — gereksiz klon maliyeti.
|
||||
//
|
||||
// Fixpoint garantisi: her pass yalnızca küçülten dönüşümler yapar
|
||||
// (katlama: n düğüm → 1 düğüm; DCE: düğüm siler). Büyüten pass
|
||||
|
|
@ -29,22 +38,27 @@ public:
|
|||
if (cfg.optConstantFolding)
|
||||
passes_.push_back(std::make_unique<ConstantFoldingPass>(diag));
|
||||
if (cfg.optDeadCodeElim)
|
||||
passes_.push_back(std::make_unique<DeadCodeElimPass>());
|
||||
passes_.push_back(std::make_unique<DeadCodeElimPass>(diag));
|
||||
maxRounds_ = cfg.maxFixpointRounds;
|
||||
}
|
||||
|
||||
// optimize: AST'yi klonlar ve optimize edilmiş kopyayı döndürür.
|
||||
// Dönen pointer caller'a aittir (delete edilmeli).
|
||||
ASTNode* optimize(ASTNode* root, SymbolTable* table) {
|
||||
ASTNode* clone = deepClone(root);
|
||||
|
||||
// Pass'leri verilen AST üstünde yerinde çalıştırır — klon yok.
|
||||
// run / ir ve diğer tek-versiyon komutları bu yolu kullanır.
|
||||
void runPassesInPlace(ASTNode* root, SymbolTable* table) {
|
||||
for (int round = 0; round < maxRounds_; ++round) {
|
||||
bool anyChange = false;
|
||||
for (auto& pass : passes_)
|
||||
if (pass->run(clone, table)) anyChange = true;
|
||||
if (pass->run(root, table)) anyChange = true;
|
||||
if (!anyChange) break;
|
||||
}
|
||||
}
|
||||
|
||||
// Önce deepClone, sonra runPassesInPlace. Orijinal dokunulmaz.
|
||||
// SADECE ast komutu kullanır — öncesi/sonrası karşılaştırması için.
|
||||
// Dönen pointer caller'a aittir (delete edilmeli).
|
||||
ASTNode* optimize(ASTNode* root, SymbolTable* table) {
|
||||
ASTNode* clone = deepClone(root);
|
||||
runPassesInPlace(clone, table);
|
||||
return clone;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -236,10 +236,12 @@ public:
|
|||
// KARMAŞIKLIK: O(1) — referans döndürür
|
||||
std::vector<ASTNode*>& getChildren() { return children; }
|
||||
|
||||
// ~ASTNode() — Sanal yıkıcı (polimorfik silme için)
|
||||
// delete ASTNode* yapıldığında doğru alt sınıf yıkıcısı çağrılır.
|
||||
// Bu olmazsa türetilmiş sınıfların kaynakları sızdırılır.
|
||||
virtual ~ASTNode() = default;
|
||||
// ~ASTNode() — children vektörünü özyinelemeli siler.
|
||||
// Typed pointer'lar (condition, thenBranch vb.) alt sınıf yıkıcılarına bırakılır;
|
||||
// children vektörü ile typed pointer'lar örtüşmediği için double-delete olmaz.
|
||||
virtual ~ASTNode() {
|
||||
for (auto* ch : children) delete ch;
|
||||
}
|
||||
|
||||
protected:
|
||||
// children — Alt düğümlerin vektörü.
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ public:
|
|||
ASTNode* Right = nullptr;
|
||||
|
||||
BinaryExpressionNode();
|
||||
~BinaryExpressionNode() override { delete Left; delete Right; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
// FunctionDeclNode
|
||||
FunctionDeclNode::FunctionDeclNode() { kind = ASTKind::FunctionDecl; }
|
||||
FunctionDeclNode::~FunctionDeclNode() { for (auto* p : params) delete p; }
|
||||
void FunctionDeclNode::log(int indent) {
|
||||
std::cout << jsonIndent(indent) << "FunctionDecl (" << name << " : " << returnType << ")\n";
|
||||
for (auto* child : children) child->log(indent + 1);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ public:
|
|||
std::string returnType;
|
||||
std::vector<VariableDeclNode*> params; // TODO(faz2): parametreler
|
||||
FunctionDeclNode();
|
||||
~FunctionDeclNode() override;
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
@ -21,6 +22,7 @@ public:
|
|||
std::string name;
|
||||
ASTNode* initExpr = nullptr;
|
||||
VariableDeclNode();
|
||||
~VariableDeclNode() override { delete initExpr; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ public:
|
|||
ASTNode* operand = nullptr;
|
||||
TokenType Operator;
|
||||
PostfixNode();
|
||||
~PostfixNode() override { delete operand; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
@ -17,6 +18,7 @@ public:
|
|||
ASTNode* callee = nullptr;
|
||||
std::vector<ASTNode*> arguments;
|
||||
CallExpressionNode();
|
||||
~CallExpressionNode() override { delete callee; for (auto* a : arguments) delete a; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
@ -27,6 +29,7 @@ public:
|
|||
std::string member;
|
||||
bool arrow = false;
|
||||
MemberAccessNode();
|
||||
~MemberAccessNode() override { delete object; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
@ -36,6 +39,7 @@ public:
|
|||
ASTNode* object = nullptr;
|
||||
ASTNode* index = nullptr;
|
||||
IndexExpressionNode();
|
||||
~IndexExpressionNode() override { delete object; delete index; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#include "parser/nodes/identifier.hpp"
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include "parser/ast_json.hpp"
|
||||
|
||||
IdentifierNode::IdentifierNode() { kind = ASTKind::Identifier; }
|
||||
|
|
@ -11,14 +10,10 @@ void IdentifierNode::log(int indent) {
|
|||
}
|
||||
|
||||
std::string IdentifierNode::toJson(int depth) {
|
||||
std::string in = jsonIndent(depth);
|
||||
std::string name = parserToken.token ? parserToken.token->token : "?";
|
||||
std::ostringstream ss;
|
||||
ss << "{\n"
|
||||
<< in << " \"kind\": \"Identifier\",\n"
|
||||
<< in << " \"name\": \"" << jsonEscape(name) << "\",\n"
|
||||
<< in << " \"resolvedType\": " << resolvedTypeJson() << ",\n"
|
||||
<< in << " \"location\": " << loc.toJson() << "\n"
|
||||
<< in << "}";
|
||||
return ss.str();
|
||||
JsonObject obj(depth);
|
||||
obj.add("kind", "Identifier");
|
||||
obj.add("name", parserToken.token ? parserToken.token->token : "?");
|
||||
obj.addRaw("resolvedType", resolvedTypeJson());
|
||||
obj.addRaw("location", loc.toJson());
|
||||
return obj.str();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#include "parser/nodes/literal.hpp"
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include "parser/ast_json.hpp"
|
||||
|
||||
LiteralNode::LiteralNode() { kind = ASTKind::Literal; }
|
||||
|
|
@ -18,22 +17,17 @@ void LiteralNode::log(int indent) {
|
|||
}
|
||||
|
||||
std::string LiteralNode::toJson(int depth) {
|
||||
std::string in = jsonIndent(depth);
|
||||
std::string val = hasDirectValue ? std::to_string(directIntValue)
|
||||
: (parserToken.token ? parserToken.token->token : "?");
|
||||
std::ostringstream ss;
|
||||
ss << "{\n"
|
||||
<< in << " \"kind\": \"Literal\",\n"
|
||||
<< in << " \"literalType\": \"" << literalTypeToString(literalType) << "\",\n"
|
||||
<< in << " \"value\": \"" << jsonEscape(val) << "\"";
|
||||
if (literalType == LiteralType::INTEGER && literalBase != 10) {
|
||||
ss << ",\n" << in << " \"base\": " << literalBase;
|
||||
}
|
||||
if (literalType == LiteralType::FLOAT) {
|
||||
ss << ",\n" << in << " \"isFloat\": true";
|
||||
}
|
||||
ss << ",\n" << in << " \"resolvedType\": " << resolvedTypeJson();
|
||||
ss << ",\n" << in << " \"location\": " << loc.toJson() << "\n"
|
||||
<< in << "}";
|
||||
return ss.str();
|
||||
JsonObject obj(depth);
|
||||
obj.add("kind", "Literal");
|
||||
obj.add("literalType", literalTypeToString(literalType));
|
||||
obj.add("value", val);
|
||||
if (literalType == LiteralType::INTEGER && literalBase != 10)
|
||||
obj.add("base", literalBase);
|
||||
if (literalType == LiteralType::FLOAT)
|
||||
obj.add("isFloat", true);
|
||||
obj.addRaw("resolvedType", resolvedTypeJson());
|
||||
obj.addRaw("location", loc.toJson());
|
||||
return obj.str();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ public:
|
|||
ASTNode* thenBranch = nullptr;
|
||||
ASTNode* elseBranch = nullptr;
|
||||
IfStatementNode();
|
||||
~IfStatementNode() override { delete condition; delete thenBranch; delete elseBranch; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
@ -25,6 +26,7 @@ public:
|
|||
ASTNode* condition = nullptr;
|
||||
ASTNode* body = nullptr;
|
||||
WhileStatementNode();
|
||||
~WhileStatementNode() override { delete condition; delete body; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
@ -36,6 +38,7 @@ public:
|
|||
ASTNode* update = nullptr;
|
||||
ASTNode* body = nullptr;
|
||||
ForStatementNode();
|
||||
~ForStatementNode() override { delete init; delete condition; delete update; delete body; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
@ -45,6 +48,7 @@ public:
|
|||
ASTNode* condition = nullptr;
|
||||
ASTNode* body = nullptr;
|
||||
DoWhileStatementNode();
|
||||
~DoWhileStatementNode() override { delete body; delete condition; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
@ -53,6 +57,7 @@ class ReturnStatementNode : public StatementNode {
|
|||
public:
|
||||
ASTNode* value = nullptr;
|
||||
ReturnStatementNode();
|
||||
~ReturnStatementNode() override { delete value; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
@ -75,6 +80,7 @@ class ExpressionStatementNode : public StatementNode {
|
|||
public:
|
||||
ASTNode* expression = nullptr;
|
||||
ExpressionStatementNode();
|
||||
~ExpressionStatementNode() override { delete expression; }
|
||||
void log(int indent = 0) override;
|
||||
std::string toJson(int depth = 0) override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -274,14 +274,29 @@ Type TypeChecker::checkExpr(ASTNode* node, const Type& expected) {
|
|||
break;
|
||||
}
|
||||
|
||||
// Karşılaştırma
|
||||
if (bin->Operator == TokenType::EQUAL_EQUAL ||
|
||||
bin->Operator == TokenType::BANG_EQUAL ||
|
||||
bin->Operator == TokenType::LESS ||
|
||||
// Eşitlik karşılaştırması: string dahil herhangi tiple çalışır
|
||||
if (bin->Operator == TokenType::EQUAL_EQUAL ||
|
||||
bin->Operator == TokenType::BANG_EQUAL) {
|
||||
result = Type::Bool();
|
||||
break;
|
||||
}
|
||||
|
||||
// Sıralama karşılaştırması: YALNIZCA sayısal tipler
|
||||
if (bin->Operator == TokenType::LESS ||
|
||||
bin->Operator == TokenType::LESS_EQUAL ||
|
||||
bin->Operator == TokenType::GREATER ||
|
||||
bin->Operator == TokenType::GREATER_EQUAL) {
|
||||
result = Type::Bool();
|
||||
if (leftType.isError() || rightType.isError()) {
|
||||
result = Type::error(); // önceki hata, sessiz geç
|
||||
} else if (leftType.isNumeric() && rightType.isNumeric()) {
|
||||
result = Type::Bool();
|
||||
} else {
|
||||
diag_.report("E003", bin->loc,
|
||||
"Sıralama operatörü yalnızca sayısal tiplerle kullanılabilir: " +
|
||||
leftType.toString() +
|
||||
" — string için yalnızca == ve != kullanın");
|
||||
result = Type::error();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,6 +112,10 @@ int Interpreter::run() {
|
|||
if (!frame.slots[instr.cond].isTruthy())
|
||||
frame.instructionPointer = instr.jumpTarget;
|
||||
break;
|
||||
case Opcode::JIF_TRUE:
|
||||
if (frame.slots[instr.cond].isTruthy())
|
||||
frame.instructionPointer = instr.jumpTarget;
|
||||
break;
|
||||
|
||||
// ── Fonksiyon çağrısı ─────────────────────────────────────────────
|
||||
case Opcode::CALL: {
|
||||
|
|
|
|||
|
|
@ -1,35 +1,24 @@
|
|||
// ============================================================================
|
||||
// saQut VM — Value (Çalışma Zamanı Değer)
|
||||
//
|
||||
// Bir saQut değerinin bellekteki temsilidir.
|
||||
//
|
||||
// ŞU AN SADECE INT:
|
||||
// fibonacci.sqt tamamen int kullanır, bu dikey dilim için int yeterli.
|
||||
// İleride float, bool, string eklenmesi için "kind" alanı iskelet olarak bırakıldı.
|
||||
//
|
||||
// BOOLEAN OLARAK KULLANIM:
|
||||
// JIF_FALSE talimatı değerin 0 olup olmadığına bakar.
|
||||
// 0 = yanlış, sıfır-dışı = doğru. C geleneği.
|
||||
// ============================================================================
|
||||
|
||||
#ifndef SAQUT_VM_VALUE
|
||||
#define SAQUT_VM_VALUE
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
// Gelecekte float/bool/string eklendiğinde burası genişleyecek.
|
||||
// Şimdilik sadece int.
|
||||
// Çalışma zamanı değer tipi.
|
||||
//
|
||||
// Bool ayrı bir kind değil — boolean sonuçlar int olarak saklanır
|
||||
// (0 = yanlış, sıfır-dışı = doğru; C geleneği, JIF_FALSE buna dayanır).
|
||||
// Float henüz implement edilmedi — IR'de float opcode yok.
|
||||
enum class ValueKind {
|
||||
Int,
|
||||
String,
|
||||
// Float, // TODO(vm-genişletme)
|
||||
// Bool, // TODO(vm-genişletme)
|
||||
// Float, // TODO: float literal + aritmetik eklenince
|
||||
};
|
||||
|
||||
struct Value {
|
||||
ValueKind kind = ValueKind::Int;
|
||||
int intValue = 0;
|
||||
std::string stringValue; // yalnızca kind == String için geçerli
|
||||
std::string stringValue; // yalnızca kind == String için geçerli
|
||||
|
||||
static Value fromInt(int n) {
|
||||
Value v;
|
||||
|
|
@ -47,12 +36,23 @@ struct Value {
|
|||
|
||||
// JIF_FALSE için: int 0 = yanlış, boş string = yanlış, diğer = doğru
|
||||
bool isTruthy() const {
|
||||
if (kind == ValueKind::Int) return intValue != 0;
|
||||
if (kind == ValueKind::String) return !stringValue.empty();
|
||||
switch (kind) {
|
||||
case ValueKind::Int: return intValue != 0;
|
||||
case ValueKind::String: return !stringValue.empty();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Okunabilir metin — dump ve hata mesajları için
|
||||
// Yazdırma ve hata mesajları için okunabilir temsil
|
||||
std::string toString() const {
|
||||
switch (kind) {
|
||||
case ValueKind::Int: return std::to_string(intValue);
|
||||
case ValueKind::String: return stringValue;
|
||||
}
|
||||
return "?";
|
||||
}
|
||||
|
||||
// Tip adı — hata mesajları için
|
||||
std::string typeName() const {
|
||||
switch (kind) {
|
||||
case ValueKind::Int: return "int";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
5
|
||||
6
|
||||
12
|
||||
3
|
||||
1
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
int main() {
|
||||
print(2 + 3);
|
||||
print(10 - 4);
|
||||
print(3 * 4);
|
||||
print(10 / 3);
|
||||
print(10 % 3);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
// B8: %= bileşik atama doğru IR üretmeli.
|
||||
// Elle hesap: 17%5=2, 10%3=1, 0%4=0, zincir: 20+5=25-3=22*2=44/4=11%3=2
|
||||
|
||||
int main() {
|
||||
int a = 17;
|
||||
a %= 5;
|
||||
print(a); // 2
|
||||
|
||||
int b = 10;
|
||||
b %= 3;
|
||||
print(b); // 1
|
||||
|
||||
int c = 0;
|
||||
c %= 4;
|
||||
print(c); // 0
|
||||
|
||||
// Tüm bileşik atamalar zinciri (regresyon)
|
||||
int x = 20;
|
||||
x += 5; // 25
|
||||
x -= 3; // 22
|
||||
x *= 2; // 44
|
||||
x /= 4; // 11
|
||||
x %= 3; // 2
|
||||
print(x); // 2
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
sıfıra bölme \(mod\)
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
// Runtime test: a %= 0 → çalışma zamanı sıfıra bölme hatası vermeli.
|
||||
|
||||
int main() {
|
||||
int a = 7;
|
||||
a %= 0;
|
||||
print(a);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
7
|
||||
9
|
||||
3
|
||||
3
|
||||
1
|
||||
11
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
int main() {
|
||||
print(1 + 2 * 3);
|
||||
print((1 + 2) * 3);
|
||||
print(10 - 4 - 3);
|
||||
print(10 / 3);
|
||||
print(10 % 3);
|
||||
print(2 + 3 * 4 - 6 / 2);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
55
|
||||
55
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
int fibonacci(int n) {
|
||||
if (n <= 1) {
|
||||
return n;
|
||||
}
|
||||
return fibonacci(n - 1) + fibonacci(n - 2);
|
||||
}
|
||||
|
||||
int fibonacciIterative(int n) {
|
||||
int first = 0;
|
||||
int second = 1;
|
||||
for (int i = 0; i < n; i = i + 1) {
|
||||
int next = first + second;
|
||||
first = second;
|
||||
second = next;
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int n = 10;
|
||||
print(fibonacci(n));
|
||||
print(fibonacciIterative(n));
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
// ! operatörü golden testi — değişken operandlar (bozuk olan yol).
|
||||
// Sabit operandlar sabit katlama tarafından derleme zamanında hesaplanır;
|
||||
// bu test IR üretim yolunu zorlayan değişken operandlar kullanır.
|
||||
//
|
||||
// Tanım: !x → sıfırsa 1, değilse 0. Sonuç her zaman 0 ya da 1.
|
||||
|
||||
int main() {
|
||||
int z = 0;
|
||||
int n = 5;
|
||||
|
||||
// Temel: !0 → 1, !5 → 0
|
||||
print(!z);
|
||||
print(!n);
|
||||
|
||||
// Çift değil normalleştirme: !!5 → 1, !!0 → 0
|
||||
print(!!n);
|
||||
print(!!z);
|
||||
|
||||
// if (!x) dallanma: z=0 iken gövde çalışmalı, n=5 iken çalışmamalı
|
||||
if (!z) {
|
||||
print(1);
|
||||
}
|
||||
if (!n) {
|
||||
print(0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
S
|
||||
evet_and
|
||||
evet_or1
|
||||
S
|
||||
evet_or2
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
// Kısa devre (short-circuit) değerlendirmesini kanıtlayan golden test.
|
||||
//
|
||||
// Amaç: sadece "doğru sonuç veriyor" değil, sağ taraftaki yan etkinin
|
||||
// ATLANDIĞINI çıktıdan kanıtlamak. Tüm operandlar değişken (sabit değil)
|
||||
// — sabit katlama yolunu değil, IR üretim yolunu test eder.
|
||||
//
|
||||
// Beklenen çıktı analizi:
|
||||
// f=0 && side() → kısa devre → "S" ÇIKMIYOR
|
||||
// t=1 && side() → b çalışır → "S" ÇIKIYOR, "evet_and"
|
||||
// t=1 || side() → kısa devre → "S" ÇIKMIYOR, "evet_or1"
|
||||
// f=0 || side() → b çalışır → "S" ÇIKIYOR, "evet_or2"
|
||||
|
||||
int side() {
|
||||
print("S");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int f = 0;
|
||||
int t = 1;
|
||||
|
||||
// && false-left: side() atlanmalı, "S" çıkmamalı
|
||||
if (f && side()) {
|
||||
print("hatali_and");
|
||||
}
|
||||
|
||||
// && true-left: side() çalışmalı → "S" çıkar, sonra "evet_and"
|
||||
if (t && side()) {
|
||||
print("evet_and");
|
||||
}
|
||||
|
||||
// || true-left: side() atlanmalı, "S" çıkmamalı, yine de "evet_or1" çıkar
|
||||
if (t || side()) {
|
||||
print("evet_or1");
|
||||
}
|
||||
|
||||
// || false-left: side() çalışmalı → "S" çıkar, sonra "evet_or2"
|
||||
if (f || side()) {
|
||||
print("evet_or2");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
int main() {
|
||||
int i = 0;
|
||||
while (i < 3) {
|
||||
print(i);
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
int j = 0;
|
||||
do {
|
||||
print(j);
|
||||
j = j + 1;
|
||||
} while (j < 3);
|
||||
|
||||
for (int k = 0; k < 3; k = k + 1) {
|
||||
print(k);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
5
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
int main() {
|
||||
int x = 5;
|
||||
do {
|
||||
print(x);
|
||||
x = x + 1;
|
||||
} while (x < 0);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
1
|
||||
2
|
||||
3
|
||||
5
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
// B4 regresyon testi: do-while koşulu 1-olmayan sıfır-dışı değer üretince
|
||||
// döngü yanlışlıkla çıkmamalı ("== 1" geçici çözümü bu hatayı veriyordu).
|
||||
//
|
||||
// Test 1: koşul 2 üretiyor — döngü 3 kez dönmeli (i: 0→1→2, çıkış i==3)
|
||||
// Test 2: koşul 0 olunca düzgün çıkıyor — döngü 1 kez dönmeli
|
||||
|
||||
int main() {
|
||||
// Koşul 2 (1-olmayan truthy): döngü erken çıkmamalı
|
||||
int i = 0;
|
||||
do {
|
||||
i = i + 1;
|
||||
print(i);
|
||||
} while (i < 3);
|
||||
// i<3 sonucu: i=1→1, i=2→1, i=3→0; çıktı: 1 2 3
|
||||
|
||||
// Koşul 0: tek iterasyon, gövde bir kez çalışır
|
||||
int j = 5;
|
||||
do {
|
||||
print(j);
|
||||
j = 0;
|
||||
} while (j);
|
||||
// j=5 → print(5), j=0 → while(0) → çıkış; çıktı: 5
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
1
|
||||
3
|
||||
5
|
||||
1
|
||||
2
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
// for döngüsünde break ve continue golden testi.
|
||||
//
|
||||
// continue kanıtı: 2 ve 4 atlanır ama güncelleme (i++) hala çalışır.
|
||||
// Eğer continue güncellemeyi atlasaydı i==2'de sonsuz döngüye girerdi.
|
||||
// 5'in çıktıda görünmesi güncellemenin çalıştığını kanıtlar.
|
||||
//
|
||||
// break kanıtı: i==3'te erken çık — 3, 4, 5 görünmemeli.
|
||||
|
||||
int main() {
|
||||
int i = 0;
|
||||
|
||||
for (i = 1; i <= 5; i = i + 1) {
|
||||
if (i == 2) { continue; }
|
||||
if (i == 4) { continue; }
|
||||
print(i);
|
||||
}
|
||||
|
||||
for (i = 1; i <= 5; i = i + 1) {
|
||||
if (i == 3) { break; }
|
||||
print(i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
1
|
||||
1
|
||||
2
|
||||
1
|
||||
3
|
||||
1
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
// İç içe döngü: içteki break sadece içteki döngüyü etkiler.
|
||||
// Döngü bağlamı yığınının doğru çalıştığını kanıtlar.
|
||||
//
|
||||
// Beklenen: her dış iterasyonda j=1 yazdırılır, j=2'de inner break.
|
||||
// Dış döngü i=1,2,3 boyunca devam eder — inner break dışarıya sızmaz.
|
||||
|
||||
int main() {
|
||||
int i = 1;
|
||||
while (i <= 3) {
|
||||
int j = 1;
|
||||
while (j <= 3) {
|
||||
if (j == 2) { break; }
|
||||
print(i);
|
||||
print(j);
|
||||
j = j + 1;
|
||||
}
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
1
|
||||
2
|
||||
4
|
||||
5
|
||||
1
|
||||
2
|
||||
3
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
// while döngüsünde break ve continue golden testi.
|
||||
|
||||
int main() {
|
||||
int i = 0;
|
||||
|
||||
// continue: 3'ü atla
|
||||
while (i < 5) {
|
||||
i = i + 1;
|
||||
if (i == 3) { continue; }
|
||||
print(i);
|
||||
}
|
||||
|
||||
// break: 4'te çık
|
||||
i = 0;
|
||||
while (i < 10) {
|
||||
i = i + 1;
|
||||
if (i == 4) { break; }
|
||||
print(i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
IR DUMP
|
||||
|
||||
NAME=hesapla PARAMS=1 SLOTS=6
|
||||
0 LOAD_CONST s1 = 0
|
||||
1 GREATER s2 = s0 > s1
|
||||
2 JIF_FALSE !s2 → 6
|
||||
3 LOAD_CONST s3 = 2
|
||||
4 MUL s4 = s0 * s3
|
||||
5 RETURN s4
|
||||
6 LOAD_CONST s5 = 0
|
||||
7 RETURN s5
|
||||
|
||||
NAME=main PARAMS=0 SLOTS=7
|
||||
0 LOAD_CONST s0 = 5
|
||||
1 CALL s1 = hesapla(s0)
|
||||
2 CALLHOST print(s1)
|
||||
3 LOAD_CONST s2 = 0
|
||||
4 CALL s3 = hesapla(s2)
|
||||
5 CALLHOST print(s3)
|
||||
6 LOAD_CONST s4 = -3
|
||||
7 CALL s5 = hesapla(s4)
|
||||
8 CALLHOST print(s5)
|
||||
9 LOAD_CONST s6 = 0
|
||||
10 RETURN s6
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
int hesapla(int n) {
|
||||
if (n > 0) {
|
||||
return n * 2;
|
||||
print(99);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main() {
|
||||
print(hesapla(5));
|
||||
print(hesapla(0));
|
||||
print(hesapla(-3));
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
IR DUMP
|
||||
|
||||
NAME=main PARAMS=0 SLOTS=8
|
||||
0 LOAD_CONST s0 = 14
|
||||
1 CALLHOST print(s0)
|
||||
2 LOAD_CONST s1 = 3
|
||||
3 CALLHOST print(s1)
|
||||
4 LOAD_CONST s2 = 1
|
||||
5 CALLHOST print(s2)
|
||||
6 LOAD_CONST s3 = 0
|
||||
7 CALLHOST print(s3)
|
||||
8 LOAD_CONST s4 = 1
|
||||
9 CALLHOST print(s4)
|
||||
10 LOAD_CONST s5 = 0
|
||||
11 CALLHOST print(s5)
|
||||
12 LOAD_CONST s6 = 1
|
||||
13 CALLHOST print(s6)
|
||||
14 LOAD_CONST s7 = 0
|
||||
15 RETURN s7
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
int main() {
|
||||
print(2 + 3 * 4);
|
||||
print((10 - 4) / 2);
|
||||
print(1 == 1);
|
||||
print(0 == 1);
|
||||
print(1 + 2 == 3);
|
||||
print(0 && 1);
|
||||
print(1 || 0);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
14
|
||||
1
|
||||
0
|
||||
25
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
14
|
||||
1
|
||||
0
|
||||
25
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
// Optimize edilmiş çalıştırmanın doğruluğunu kanıtlayan golden test.
|
||||
//
|
||||
// Tetiklenen optimizasyonlar:
|
||||
// - Constant folding: 100 - 6*15 + 4, 3*3 + 4*4 derleme zamanında hesaplanır
|
||||
// - DCE: return sonrası print(999) ve print(888) silinir
|
||||
// - Folding zincirleme: iç fonksiyon çağrısı olmaksızın tüm sabit ifadeler katlanır
|
||||
//
|
||||
// saqut run ve saqut run --optimized AYNI çıktıyı vermeli.
|
||||
// Eğer optimizasyon bir değeri yanlış katlarsa veya canlı kodu silerse bu test kırılır.
|
||||
|
||||
int compute() {
|
||||
int result = 100 - 6 * 15 + 4;
|
||||
return result;
|
||||
print(999);
|
||||
}
|
||||
|
||||
int classify(int n) {
|
||||
if (n > 0) {
|
||||
return 1;
|
||||
print(888);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main() {
|
||||
print(compute());
|
||||
print(classify(5));
|
||||
print(classify(-3));
|
||||
print(3 * 3 + 4 * 4);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
1
|
||||
0
|
||||
1
|
||||
0
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
// Regresyon testi: string == ve != çalışmaya devam etmeli.
|
||||
// TypeChecker string sıralama operatörlerini bloklamasına rağmen
|
||||
// eşitlik operatörleri string ile kullanılabilmeli.
|
||||
|
||||
int main() {
|
||||
string a = "merhaba";
|
||||
string b = "merhaba";
|
||||
string c = "dunya";
|
||||
|
||||
print(a == b);
|
||||
print(a == c);
|
||||
print(a != c);
|
||||
print(b != b);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Merhaba
|
||||
saQut calisiyor
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
int main() {
|
||||
print("Merhaba");
|
||||
print("saQut calisiyor");
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
E003
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
// Negatif test: string sıralama operatörleri derleme hatası vermeli.
|
||||
// Bu dosya DERLENMEMELI — TypeChecker E003 üretmeli.
|
||||
// < > <= >= operatörlerinin her biri string ile bloklanır.
|
||||
|
||||
int main() {
|
||||
string a = "merhaba";
|
||||
string b = "dunya";
|
||||
if (a < b) { return 1; }
|
||||
return 0;
|
||||
}
|
||||
Loading…
Reference in New Issue