Commit Graph

5 Commits

Author SHA1 Message Date
saqut 786812c717 feat(string+error+null): ADR-024/025/021 uygulama — string concat, try/catch/throw, nullable akış-analizi
## String cilası (ADR-024)
- STRING_CONCAT opcode: s1 + s2 ve s1 += s2 → yeni string üretir
- Tip denetleyicide string + string → string; içerik == zaten vardı
- Golden: tests/golden/string/concat.sqt

## Hata yönetimi (ADR-025, #57)
- AST: TryStatementNode, ThrowStatementNode
- Parser: try { } catch (Error e) { }, throw <ifade>;
- IR: ENTER_TRY / LEAVE_TRY / THROW opcode'ları + backpatch
- VM: TryFrame yığını + pendingThrow_ unwind; runtime hatalar (DIV/0, OOB)
  artık yakalanabilir Error nesnesi olarak yükseltiliyor
- Builtin: Error{line,col,message,trace,code} sembol tablosuna kayıtlı
- Golden: tests/golden/error/basic_catch.sqt, throw_and_nested.sqt

## Null akış-analizi (ADR-021 — REVİZE, a!/??/?. yasak)
- Type: nullable bool alanı; asNullable/asNonNull/equalsBase/isNullLiteral
- fromName("int?") → nullable int; toString() → "int?"
- Parser: T? değişken/parametre/dönüş tipi; int? f() dispatch bug'ı düzeltildi
- IR: LOAD_NULL opcode; null literal → Value::null()
- Tip denetleyici:
  - checkAssign: T? ← null OK; T ← T? E003; T? ← T OK (widening)
  - Nullable operand aritmetikte/karşılaştırmada E003
  - MemberAccess: nullable nesnede doğrudan erişim E003
  - Nested: if (a != null) → then'de non-null
  - Guard: if (a == null) return; → sonrasında non-null
  - &&: sol null-check → sağ tarafta non-null
- Golden: tests/golden/null/{narrowing,and_narrowing,nullable_assign_error,nullable_operand_error}

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAu3MGu3sWAUvTu7N9agPk
2026-06-20 21:34:25 +03:00
saqut f1cb983b69 feat(array): GC-hazır nesne modeli + array runtime (ADR-020/022/023)
- src/vm/object.hpp: Object, ArrayObject, Heap (v1: toplama yok, mark-sweep kancaları hazır)
- src/vm/value.hpp: ValueKind::Ref + Nil eklendi (ADR-020/021)
- src/ir/instruction.hpp: ARRAY_NEW/GET/SET/LEN opcodes
- src/ir/ir_generator: array literal + a[i] okuma/yazma codegen
- src/parser: [1,2,3] array literal, int[] tip sözdizimi (Java/C# stili)
- src/vm/interpreter: ARRAY_NEW/GET/SET/LEN, sınır kontrolü, referans semantiği
- EQUAL_EQUAL/NOT_EQUAL: Ref türü için kimlik karşılaştırması (ADR-023)
- type.hpp: Type::fromName "int[]" vb. array tipleri destekliyor
- golden test: tests/golden/array/ref_semantics.sqt (referans semantiği, kimlik ==)
- 20 golden test geçiyor

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 16:18:23 +03:00
saqut c5f62a3a9d chore: ana dal master → 0.1.0 olarak güncellendi
master branch silindi. CLAUDE.md güncellendi.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 15:39:59 +03:00
Claude f69654bbca
docs: dökümanlar ve issue'lar gerçek durumla güncellendi
- CLAUDE.md: "Mevcut durum" bölümü yeniden yazıldı — tüm pipeline
  çalışıyor, bilinen eksikler (#35–#38) listelendi
- docs/fikirler.md: "kod üretimi VM henüz yoktur" notu kaldırıldı
- docs/adr-frontend-analiz.md: "henüz kodlanmamıştır" uyarısı kaldırıldı
- docs/roadmap-frontend.md: tüm fazlar (0–4)  TAMAMLANDI olarak işaretlendi
- readme.md: saqut check komutu CLI tablosuna eklendi
- GitHub #30–#34 issue'ları kapatıldı (düzeltilmiş bug'lar)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 19:07:11 +00:00
abdussamedulutas 490db7ca31 chore: CLAUDE.md güncelle + gen_large.py + large.sqt ekle
- CLAUDE.md: Faz 2/3 tamamlandı, yeni komutlar (check), nlohmann/json,
  semantic/ klasörü, performans optimizasyonu notları güncellendi
- scripts/gen_large.py: 2.3MB geçerli .sqt dosyası üreten benchmark script'i
- examples/large.sqt: 5000 fonksiyon, 90K satır, performans test fixture'ı
2026-06-18 18:40:30 +03:00