Selfhosting Dev
e7ad2191de
fix(llvm): String/Plugin return value handling improvements by ChatGPT
Major fixes for LLVM backend string and plugin return value handling:
1. MIR Type Annotations:
- Added StringBox method return types (substring/concat/replace/trim/toUpper/toLower)
- Enhanced type inference for BoxCall operations
2. LLVM BinOp String Concatenation:
- Added safe handle-to-pointer conversion paths
- Support for ptr+i64 and i64+ptr concatenation patterns
- Uses nyash.string.concat_hh for handle-based concatenation
3. ExternCall Selection:
- Smart selection between C string (i8*) and handle (i64) variants
- Improved print/log function selection based on argument types
4. StringBox Fast-path Optimization:
- Direct AOT concatenation for StringBox.concat
- Bypasses plugin path for better performance
5. Consistent String Representation:
- AOT uses i8* (C string) as primary representation
- Handles used for print/concat auxiliary paths
6. Build Fix:
- Removed duplicate plugin.rs to resolve nyrt build conflicts
Results: LLVM plugin return smoke tests now pass (NYASH_LLVM_PLUGIN_RET_SMOKE=1)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 20:18:53 +09:00
..
2025-09-05 13:29:17 +09:00
2025-09-11 20:18:53 +09:00