xgopilot
04ef1b0767
build: remove incorrect TODO comment
...
Remove TODO(lijie) comment as requested - the syscall.init weak stub is intentional.
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: cpunion <8459+cpunion@users.noreply.github.com >
2025-11-16 09:16:36 +00:00
xgopilot
9b71b3f2dc
build: apply review feedback on main module generation
...
- Remove sizeTypeForArch, use prog.Uintptr() directly
- Replace charPtrType with prog.CStr()
- Add back TODO(lijie) comment for syscall patch workaround
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: cpunion <8459+cpunion@users.noreply.github.com >
2025-11-16 05:28:10 +00:00
xgopilot
9926c4ed6a
build: apply review feedback on main module generation
...
- Change pkg.PkgPath to pkg.ID for better debugging support
- Add comment explaining syscall.init weak stub declaration
- Simplify sizeTypeForArch to use prog.Uintptr() directly
- Remove unused runtime import
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: cpunion <8459+cpunion@users.noreply.github.com >
2025-11-16 04:35:41 +00:00
xgopilot
7b7d7f9cdb
build: remove error return from genMainModule
...
The genMainModule function never returns an error, so simplified
its signature to return only Package.
Updated:
- genMainModule signature: (Package, error) -> Package
- Call site in build.go to not handle error
- Both test cases to remove error checking
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: cpunion <8459+cpunion@users.noreply.github.com >
2025-11-14 22:03:36 +00:00
xgopilot
131fe2c504
fix: separate stdout and stderr null checks in emitStdioNobuf
...
The original code incorrectly used the stdout null check condition
for both stdout and stderr pointer selection. This caused incorrect
behavior when stderr is null but stdout is not, or vice-versa.
This fix separates the null checks for stdout and stderr into
independent conditions, ensuring each stream is properly selected
based on its own null status.
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: cpunion <8459+cpunion@users.noreply.github.com >
2025-11-14 15:57:00 +00:00
Li Jie
33a53b6e64
build: refactor main module generation
2025-11-14 23:39:56 +08:00
xushiwei
2f65c98eb4
Merge pull request #1348 from cpunion/feature/defer-loop
...
defer: enable loop lowering
2025-11-13 17:59:26 +08:00
Li Jie
aeb5d82d3e
ssa: remove unreachable switch case
2025-11-13 16:15:36 +08:00
Li Jie
317de80b42
test: add nested defer/loop/branch/recover tests and fix mixed branch recover mapping
2025-11-13 16:15:33 +08:00
Li Jie
0455ad4443
ssa: Add test for >64 conditional defers; cover panic at eh.go:252-254
2025-11-13 15:48:50 +08:00
Li Jie
e459ca928b
runtime: remove overlays for defer workaround
2025-11-13 15:48:50 +08:00
Li Jie
21fef123d2
di: clean unreachable code
2025-11-13 15:48:50 +08:00
Li Jie
983a189c18
test: cover defer recover and nested loops
2025-11-13 15:48:49 +08:00
Li Jie
cb173f91d0
ssa: rely on runtime thread defer TLS
2025-11-13 15:48:49 +08:00
Li Jie
30bde9f6b5
tls: stub handle for go test
2025-11-13 15:48:49 +08:00
Li Jie
3307860d33
ssa: avoid redundant thread defer update
2025-11-13 15:48:49 +08:00
Li Jie
16709411a0
defer: enable loop lowering
2025-11-13 15:48:46 +08:00
xushiwei
3f8c95cf87
Merge pull request #1334 from goplus/dependabot/go_modules/github.com/goplus/gogen-1.19.5
...
chore(deps): bump github.com/goplus/gogen from 1.19.3 to 1.19.5
2025-11-13 07:49:29 +08:00
xushiwei
0dbe528e6d
Merge pull request #1304 from MeteorsLiu/impl-stacksave
...
feat: implement `llgo.stackSave`
2025-11-13 07:48:01 +08:00
dependabot[bot]
91f6ad9bfa
chore(deps): bump github.com/goplus/gogen from 1.19.3 to 1.19.5
...
Bumps [github.com/goplus/gogen](https://github.com/goplus/gogen ) from 1.19.3 to 1.19.5.
- [Release notes](https://github.com/goplus/gogen/releases )
- [Commits](https://github.com/goplus/gogen/compare/v1.19.3...v1.19.5 )
---
updated-dependencies:
- dependency-name: github.com/goplus/gogen
dependency-version: 1.19.5
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-11-11 23:40:43 +00:00
xushiwei
4d1906d722
Merge pull request #1391 from goplus/dependabot/go_modules/github.com/goplus/lib-0.3.1
...
chore(deps): bump github.com/goplus/lib from 0.3.0 to 0.3.1
2025-11-12 07:38:32 +08:00
dependabot[bot]
ff4a180860
chore(deps): bump github.com/goplus/lib from 0.3.0 to 0.3.1
...
Bumps [github.com/goplus/lib](https://github.com/goplus/lib ) from 0.3.0 to 0.3.1.
- [Release notes](https://github.com/goplus/lib/releases )
- [Commits](https://github.com/goplus/lib/compare/v0.3.0...v0.3.1 )
---
updated-dependencies:
- dependency-name: github.com/goplus/lib
dependency-version: 0.3.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-11-11 23:19:50 +00:00
xushiwei
7ce2733edf
Merge pull request #1383 from luoliwoshang/feat/nil/recover
...
fix(runtime): restore SIGSEGV signal handler for non-wasm platforms
2025-11-12 06:43:02 +08:00
luoliwoshang
2363d28d57
feat(runtime): add SIGSEGV signal handler to convert nil pointer dereference to recoverable panic
...
- Add z_rt_default.go with signal handler for SIGSEGV on non-wasm platforms
- Convert segmentation faults from nil pointer access to Go panic
- Enable recover() to catch nil pointer dereference errors
- Use build tag (!wasm) to maintain wasm platform compatibility
- Remove commented-out signal handling code from z_rt.go
This aligns llgo's behavior with standard Go, where accessing nil pointer
fields triggers a recoverable panic instead of immediate program crash.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-10 15:15:51 +08:00
xushiwei
830e8e7058
Merge pull request #1381 from goplus/xgopilot/claude/document-outll-process-1730340128
...
docs(CLAUDE.md): document out.ll update process after IR changes
2025-11-10 13:55:01 +08:00
xushiwei
34caf518a1
Merge pull request #1386 from goplus/xgopilot/claude/issue-1385-1762256384
...
chore: remove deprecated //export LLGoVersion comment
2025-11-10 13:53:02 +08:00
xushiwei
a676ba29db
Merge pull request #1387 from luoliwoshang/runtime/iface/func
...
fix(runtime): segmentation fault when calling interface private methods cross-package
2025-11-10 13:51:42 +08:00
xushiwei
d368cade1c
Merge pull request #1388 from luoliwoshang/ci/no-auto-update
...
ci:avoid auto upgrade before brew install
2025-11-10 13:47:43 +08:00
luoliwoshang
4e374a99ff
test:refression test for https://github.com/goplus/llgo/issues/1370
...
Co-authored-by: xgopilot <noreply@goplus.org >
Co-authored-by: Claude <noreply@anthropic.com >
2025-11-06 21:02:36 +08:00
luoliwoshang
41b403aef7
fix(runtime): segmentation fault when calling interface private methods cross-package
...
Co-authored-by: xgopilot <noreply@goplus.org >
Co-authored-by: Claude <noreply@anthropic.com >
2025-11-06 21:00:37 +08:00
luoliwoshang
cda9d682f2
ci:avoid brew auto upgrade dependant
2025-11-06 19:13:11 +08:00
xgopilot
742bfd95a2
chore: remove deprecated //export LLGoVersion comment
...
Removes the deprecated //export LLGoVersion comment from internal/env/version.go
as it is no longer needed.
Fixes #1385
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com >
2025-11-04 11:45:10 +00:00
xgopilot
01af858a2e
docs(CLAUDE.md): remove redundant test failure mention
...
Removed the sentence about test failures as requested.
The "Why this matters" section now focuses on the benefits
of the process rather than the negative consequences.
🤖 Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com >
2025-10-31 03:43:06 +00:00
xgopilot
c557aa2af1
docs(CLAUDE.md): remove pro tip line
...
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com >
2025-10-31 03:34:08 +00:00
xgopilot
c15c7a05b7
docs(CLAUDE.md): add gentests for batch out.ll updates
...
Updated the out.ll update workflow to document both tools:
- gentests: batch regeneration of all test files (recommended)
- llgen: individual test directory regeneration (for inspection)
Verified gentests works correctly by testing the regeneration
of all out.ll files. The tool successfully processes all
non-Python test directories.
🤖 Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com >
2025-10-31 03:27:49 +00:00
xgopilot
8f5f36e447
docs(CLAUDE.md): document out.ll update process after IR changes
...
Add comprehensive documentation explaining:
- What out.ll files are (IR comparison test files)
- When to update them (after modifying IR generation logic)
- How to update them (reinstall llgen, regenerate files)
- Why this matters (test consistency and regression detection)
This documentation will help avoid wasting time on repeatedly updating
test files, as it clarifies the required workflow when making compiler
changes that affect IR generation.
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com >
2025-10-31 02:43:06 +00:00
Haolan
bf6f785988
Merge branch 'main' of https://github.com/goplus/llgo into impl-stacksave
2025-10-30 13:48:13 +08:00
xushiwei
86cafff113
Merge pull request #1375 from goplus/dependabot/github_actions/actions/download-artifact-6
...
chore(deps): bump actions/download-artifact from 5 to 6
2025-10-27 16:37:07 +08:00
xushiwei
3c88949557
Merge pull request #1376 from goplus/dependabot/github_actions/actions/upload-artifact-5
...
chore(deps): bump actions/upload-artifact from 4 to 5
2025-10-27 16:36:57 +08:00
dependabot[bot]
533ba9ebd8
chore(deps): bump actions/upload-artifact from 4 to 5
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-10-27 00:17:07 +00:00
dependabot[bot]
f34062166b
chore(deps): bump actions/download-artifact from 5 to 6
...
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: actions/download-artifact
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-10-27 00:17:03 +00:00
xushiwei
c036243b3f
Merge pull request #1352 from goplus/xgopilot/claude/issue-1351-1760682793
...
Remove redundant CompareString from llgo:skip directive
2025-10-27 07:18:05 +08:00
xushiwei
e16fc69ce3
Merge pull request #1349 from goplus/xgopilot/claude/issue-1346-1760499310
...
fix: set build.Default.Compiler to gc in init function
2025-10-27 07:16:15 +08:00
xushiwei
a2c81327ea
Merge pull request #1355 from goplus/feature/reflect-indirect
...
feat(reflect): add Indirect function
2025-10-27 07:13:54 +08:00
xgopilot
a74ca940e2
feat(reflect): add struct test cases for Indirect function
...
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com >
2025-10-20 02:29:18 +00:00
xgopilot
0c68ae00c9
refactor: rename reflect-indirect to reflectindirect
...
Follow naming convention of other demo folders (reflectfunc, gotime, etc.)
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com >
2025-10-17 09:19:20 +00:00
xgopilot
8d6d1b76f2
refactor: move reflect.Indirect test to _demo and use panic()
...
- Moved test from _cmptest/reflect_indirect/ to _demo/go/reflect-indirect/
- Refactored to use panic() for validation instead of fmt.Println
- Added proper assertions for all test cases
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com >
2025-10-17 09:06:09 +00:00
xgopilot
e47728b053
feat(reflect): add Indirect function
...
Implements reflect.Indirect function to support pointer dereferencing.
This function returns the value that a pointer points to, or returns
the value unchanged if it's not a pointer.
Fixes #1354
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com >
2025-10-17 08:06:30 +00:00
xgopilot
9b397725da
Remove redundant CompareString from llgo:skip directive
...
The CompareString in the llgo:skip directive is redundant because
the overlay mechanism automatically handles symbol skipping when
an overlay package defines a symbol.
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com >
2025-10-17 06:36:46 +00:00
xgopilot
420ad8e010
refactor: simplify go/build patch - use build.Default directly
...
Remove unnecessary go:linkname, runtime import, and unsafe import.
Access build.Default.Compiler directly instead of via linkname.
- Removed go:linkname directive
- Removed runtime and unsafe imports
- Removed unnecessary _ = runtime.Compiler line
- Simplified from 27 lines to 19 lines
- Same functionality, cleaner code
Generated with [codeagent](https://github.com/qbox/codeagent )
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com >
2025-10-16 13:28:54 +00:00