Commit Graph

1142 Commits

Author SHA1 Message Date
9572d0f321 Implement targeted SocketBox Clone fix for shared mutable state
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 10:14:35 +00:00
654e6692b0 Phase 1-3 implementation: Arc sharing in core data structures
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 10:05:42 +00:00
b8bc41120e Complete Phase 9.7: Box FFI/ABI + ExternCall with working WASM demo
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 08:59:59 +00:00
2091462441 Implement Phase 9.7: ExternCall instruction and WASM runtime imports
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 08:56:39 +00:00
d5fae25dc9 Fixed SocketBox state consistency bug - isServer() now works correctly after bind()
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 08:17:04 +00:00
4548d5acbd SocketBox state sharing partially fixed - isServer works, listener Arc issue remains
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 08:12:30 +00:00
e3be02db47 Diagnosed Arc sharing issue in SocketBox cloning - complex race condition
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 08:03:48 +00:00
5730d2fa0f Identified root cause of SocketBox bug - local variable clone issue
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 07:51:06 +00:00
85a5ce053d Fix WASM Jump/Branch implementation and HTTPServer listen() functionality
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 07:14:45 +00:00
004b6b7953 Complete HTTP server infrastructure integration and test basic functionality
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 06:20:45 +00:00
212b46825f Implement HTTP server infrastructure: SocketBox, HTTPServerBox, HTTPRequestBox, HTTPResponseBox
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 06:10:52 +00:00
626572a012 Fix WASM import expectations and validate complete implementation
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 05:35:17 +00:00
c1ae84ce61 Implement basic WASM string constant support
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 05:31:36 +00:00
a5bcf95bdd Complete Week 1 AOT implementation with working CLI and .cwasm generation
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 04:44:26 +00:00
db9bcd3b45 Implement AOT backend infrastructure with CLI integration
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 04:38:20 +00:00
bf51d3c71b Expand VM BoxCall support - add StringBox substring/concat and ArrayBox methods
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 03:46:06 +00:00
d26b365791 Fix VM BoxCall implementation - now returns actual method results
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 03:39:08 +00:00
f5f85ef175 Complete Phase 8.5A: MIR 25-instruction hierarchical implementation with working tests and demo
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 02:46:08 +00:00
525747d2b3 Implement Phase 8.5A: Core 25-instruction MIR specification with ownership verification
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 02:39:04 +00:00
7d1cdb2935 Merge branch 'main' of github.com-moecharm:moe-charm/nyash 2025-08-14 11:08:14 +09:00
cdeb4818a7 Phase 8.4: Complete AST→MIR Lowering - Basic object operations implemented
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-14 01:48:40 +00:00
c7365d3dc9 feat(merge): integrate Phase 8.3 WASM Box Operations + Benchmark System
🎉 Successful merge of Copilot and Claude implementations:

**Copilot Contributions (Phase 8.3):**
-  WASM Box Operations: RefNew/RefGet/RefSet complete implementation
-  Memory management: BoxLayout, MemoryManager with standard types
-  WASM codegen: Box allocation, field access, type-safe operations
-  Runtime support: malloc, heap management, type ID system

**Claude Contributions (Benchmark System):**
-  Comprehensive benchmark framework (src/benchmarks.rs)
-  CLI integration: --benchmark, --iterations, --output options
-  3-backend performance comparison (Interpreter/VM/WASM)
-  280x WASM speedup verification system
-  Golden dump testing infrastructure

**Unified Features:**
- 🔧 execute_wasm_mode: Supports both output file and stdout
- 🔧 CLI arguments: All options preserved and functional
- 🔧 Error handling: Improved MIR verification messages
- 🔧 Build system: All modules properly integrated

**Next Steps Ready:**
- 📊 MIR diet planning (35→20 instructions)
- 🚀 Phase 8.4: AOT WASM native compilation
- 🧪 Golden dump automation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 08:12:36 +09:00
a0a97620b8 Complete Phase 8.3 WASM Box Operations - Everything is Box in WASM
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 22:20:50 +00:00
8ec80a35c3 feat(benchmark): add comprehensive performance benchmarking system
🚀 Phase 8.2 PoC2 Achievement: 280x WASM performance boost proven\!

## New Features:
- Complete benchmark framework (src/benchmarks.rs)
- CLI integration: --benchmark --iterations options
- 3-backend comparison: Interpreter/VM/WASM
- Automated performance measurement & reporting

## Benchmark Results (100 iterations average):
- WASM: 0.17ms (280x faster than Interpreter\!)
- VM: 16.97ms (2.9x faster than Interpreter)
- Interpreter: 48.59ms (baseline)

## Added Files:
- benchmarks/bench_{light,medium,heavy}.nyash - Test cases
- benchmark_summary_20250814.md - Clean results
- wasm_demo/ - Browser execution environment

## Documentation Updates:
- docs/execution-backends.md - Added benchmark usage
- docs/CURRENT_TASK.md - Phase 8.3 Copilot coordination
- CLAUDE.md - Quick benchmark access

## Copilot Integration Ready:
- Phase 8.3 merge conflict avoidance strategy documented
- Benchmark framework ready for Box operation performance validation
- CLI integration preserved for future enhancements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 07:19:23 +09:00
8a7532a77b 🎉 Phase 8.2 PoC1 COMPLETE: MIR→WASM basic arithmetic working end-to-end!
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 13:19:43 +00:00
3335f26812 Phase 8.2 PoC1 Progress: WASM codegen mostly working, debugging Return instruction issue
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 13:15:02 +00:00
8276eeeb64 Phase 8.1 Complete: WASM backend foundation implementation
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 13:05:49 +00:00
28070ea2f2 Fix VM execution bug - include terminator instructions in execution loop
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 12:18:47 +00:00
cefac9051e Phase 7.4: Complete async MIR implementation with comprehensive tests
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 11:59:22 +00:00
f6e6e5bae4 Phase 7.2: Implement AST→MIR lowering for nowait/await expressions
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 11:48:53 +00:00
b59f0ee419 Phase 7.1: Add MIR instructions for async operations (FutureNew, FutureSet, Await)
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 11:46:01 +00:00
9adb34ff58 Complete Phase 6.1: AST lowering for New/FieldAccess → MIR Ref ops with tests and VM field storage
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 10:26:46 +00:00
af3ad5e5e2 Implement core AST lowering for New/FieldAccess to MIR Ref ops with basic VM field storage
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 10:20:37 +00:00
84d2aac8da Implement Phase 6 Box reference operations in MIR/VM - RefNew/RefGet/RefSet/WeakNew/WeakLoad/Barrier*
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 09:45:22 +00:00
3082c77ecd Implement Phase 5.2: static box Main lowering to MIR
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 07:53:14 +00:00
e75e3e15e8 Complete Phase 5.1: Add terminator handling for nested control flow
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 07:17:45 +00:00
ba568f7dfb Implement Local and TryCatch lowering in MirBuilder
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 07:13:53 +00:00
d3a85b2305 Implement Phase 5: Control flow & exceptions in MIR/VM - Core functionality complete
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 06:23:28 +00:00
2f3b453fcb Implement Phase 1: MIR + VM backend with golden tests
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 05:59:10 +00:00
079a095f5c Implement Phase 0: Stabilize CLI build with feature separation
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 05:06:43 +00:00
2eba31143a test: green up after Phase 2 merge for #26\n\n- Fix AST tests (is_override)\n- Align MIR builder test with current If AST\n- Adjust ResultBox API usage in tests\n- Add len() helpers to ArrayBox/BufferBox for tests 2025-08-13 11:53:34 +09:00
c6f76505b5 🔥 Phase 2 Complete: Comprehensive fini system with ChatGPT5 design
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 02:22:20 +00:00
014fac2b9b Phase 1 Complete: Fixed weak reference bug with dynamic ID parsing
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 02:11:07 +00:00
16cd53d125 Complete Canvas Box ecosystem with 10 professional WASM demos
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 00:36:32 +00:00
cfe550ac01 Implement core Canvas Boxes and 5 WASM demos
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-13 00:27:07 +00:00
9826c7992b Final validation: multi-parent weak reference system complete
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-12 22:27:27 +00:00
c6a135193d Complete weak reference auto-nil system implementation
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-12 22:23:38 +00:00
5820d02ef7 Complete weak reference architecture with auto-nil simulation framework
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-12 21:31:06 +00:00
67e30315f3 Implement hybrid InstanceBox architecture with weak reference accessors
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-12 21:23:08 +00:00
339f7df617 Phase 4 Complete: Interpreter integration with weak field detection
Co-authored-by: moe-charm <217100418+moe-charm@users.noreply.github.com>
2025-08-12 20:36:00 +00:00