|
|
207fa9f7dd
|
fix: Phase 1 Step 0 cleanup + CRITICAL #3, MEDIUM #36-37, LOW #50
Files modified (5):
hbrt/macro.go — Replace hand-rolled parseFloat/parseInt64 with strconv (#50)
Remove stale TODO, redundant TrimSpace
hbrt/macroeval.go — Use strconv for literal parsing (was using removed functions)
hbrt/class.go — CRITICAL #3: Change RWMutex to Mutex on classList
Prevents slice reallocation race on concurrent GetClass
hbrt/goroutine.go — #36: Channel double-close protection (sync.Once)
#37: Send on closed channel recovery (defer/recover)
Add IsClosed(), safe Receive (handles closed channel)
hbrt/gobridge.go — Already clean (confirmed)
hbrt/hbfunc.go — Already clean (confirmed)
Issues resolved: #3 (CRITICAL), #36, #37 (MEDIUM), #50 (LOW)
Total fixed: 16/53
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-01 10:51:20 +09:00 |
|
|
|
d7513eeb24
|
fix: Code review round 2 — race conditions, dead code, hardcoded paths
CRITICAL fixes:
- #1 vm.go: Mutex on libModules/dynamicFuncs global slices
RegisterLibModule/RegisterDynamicFunc now thread-safe
RegisterLibModules copies under lock, clears, releases
- #4 shutdown.go: Signal handler goroutine leak fixed
Uses done channel + select for clean exit on normal shutdown
HIGH fixes:
- #7-8 gobridge.go: Remove dead if/else branches (both identical)
- #13-14 main.go: Remove hardcoded /mnt/d/harbour-core paths
Use HB_INC env var + standard /usr/local/include/harbour only
- #15 main.go: Remove unused frbModSeq variable
MEDIUM fixes:
- #22 expr.go: Remove unused parts variable in parseInterpolatedString
- #51 macro.go: Remove var _ = fmt.Sprintf import guard
- macroeval.go: Remove unused lexer import and guard
Total fixed this session: 12/53 issues resolved
Remaining: 41 (CRITICAL: 1, HIGH: 9, MEDIUM: 16, LOW: 16)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-01 10:32:09 +09:00 |
|
|
|
7c61db70c3
|
fix: Critical code review fixes — race conditions, panic recovery, LTRIM/RTRIM
CRITICAL fixes:
- fileio.go: Add sync.Mutex to file handle table (race condition #2)
allocHandle/getHandle/removeHandle thread-safe helpers
- goroutine.go: Add defer/recover to GoLaunch/GoLaunchBlock
Goroutine panic no longer crashes entire process (#5)
HIGH fixes:
- strings.go: Implement proper LTrim (TrimLeft) and RTrim (TrimRight)
Previously both aliased to AllTrim — silent semantic bug (#18)
- register.go: TRIM = RTrim (Harbour compatible)
From 53-issue senior code review.
Remaining: 47 issues (HIGH: 10, MEDIUM: 18, LOW: 16, CRITICAL: 3)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-01 10:17:30 +09:00 |
|
|
|
e04ae563ef
|
test: 16 dynamic PRG tests — all new syntax works in FRB/runtime
Verifies every Five extension works in dynamic compilation:
- Multi-return (RETURN a,b + a,b := Func())
- DEFER (Go defer in PRG)
- Slice (a[2:4])
- Channel operators (ch <- val, <- ch)
- SPAWN / LAUNCH / GOROUTINE
- WATCH (channel multiplexing)
- ASYNC / AWAIT
- WITH TIMEOUT
- Nil-safe (?:)
- f-string interpolation
- CONST block
- PARALLEL FOR
- IMPORT + pkg.Func() (Go direct call)
- obj:Method() (Go object bridge)
- MacroEval (runtime expression evaluation)
All 16 tests PASS — dynamic PRG has full feature parity.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-31 10:16:54 +09:00 |
|
|
|
6b37cc19e4
|
test: 8 shutdown tests — EXIT, AtExit, WorkArea, panic-safe, statics
Tests verify:
- EXIT PROCEDURE auto-execution on shutdown
- Reverse module order for EXIT
- AtExit LIFO callback order
- WorkArea CloseAll on exit
- Panic in cleanup doesn't crash (safeCall)
- Shutdown runs exactly once (sync.Once)
- Static variables cleared
- Full sequence order: EXIT → AtExit → WA:Close → onExit
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-31 10:12:34 +09:00 |
|
|
|
272576f6ce
|
feat: Harbour-compatible VM shutdown sequence
Implements full cleanup on program exit (normal, Ctrl+C, crash):
- EXIT PROCEDURE auto-execution (reverse module order)
- AtExit callback registry (LIFO order)
- All WorkAreas auto-close (child before parent)
- Terminal restore (raw → normal) on signal/exit
- Static variables clear
- Signal handlers (SIGINT, SIGTERM) for clean shutdown
- shutdown.go: Harbour hb_vmQuit() 25-step sequence adapted for Five
- vm.go: Run() now calls Shutdown() via defer
- rawtty.go: terminal restore registered with shutdown system
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-31 10:07:42 +09:00 |
|
|
|
59568f3301
|
Five v0.9 — Harbour + Go fusion language
- Compiler: PP → Lexer → Parser → Analyzer → Gengo pipeline
- Parser: 232/236 (98%) Harbour compatibility, registry-based dispatch
- RTL: 351 Harbour-compatible functions
- RDD: DBF/NTX/CDX engines with Rushmore bitmap optimization
- Go Interop: IMPORT + pkg.Func() + obj:Method() with FastPath (15M calls/sec)
- HB_FUNC API: Full Harbour C API compatible Go bridge
- Concurrency: SPAWN/LAUNCH/GOROUTINE, <-, WATCH, PARALLEL FOR, ASYNC/AWAIT
- Extensions: Multi-return, DEFER, Slice, f-string, Nil-safe ?:, CONST
- Macro Compiler: Runtime AST parsing and evaluation
- Debugger: TUI debugger with source display, breakpoints, stepping
- FRB: Native + Pcode dual mode runtime binary
- Tests: 13 packages ALL PASS
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-03-31 09:41:50 +09:00 |
|