Commit Graph

120 Commits

Author SHA1 Message Date
xushiwei
325e9a93b5 Merge pull request #1347 from cpunion/feature/tls-gc
tls: add gc-aware pthread slots
2025-10-16 08:10:53 +08:00
Li Jie
1ed418e77e tls: document package and guard helpers 2025-10-15 13:11:35 +08:00
Li Jie
2110db7263 tls: add gc-aware pthread slots 2025-10-15 12:21:51 +08:00
xgopilot
ed3176a6cc test: expand maphash demo with comprehensive API coverage
- Add tests for all major hash/maphash public APIs:
  * Hash basics (WriteString, Sum64, Reset)
  * MakeSeed and SetSeed functionality
  * Write methods (Write, WriteByte, WriteString)
  * Bytes and String convenience functions
- Use panic() for unexpected errors instead of silent failures
- Add proper error checking and validation
- Document Comparable/WriteComparable limitations in overlay

Note: Comparable() and WriteComparable() are not yet supported and will
panic with 'intrinsic' error as they require runtime intrinsic support.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com>
2025-10-14 10:18:28 +00:00
xgopilot
e5ebc32583 fix: add randUint64 wrapper for Go 1.21 compatibility
Implement randUint64() directly in the maphash overlay to ensure compatibility
across Go versions. Go 1.21's randUint64() calls runtime.fastrand64, while
Go 1.22+ calls runtime.rand. The wrapper function bridges to llgo's fastrand64
implementation, avoiding undefined symbol errors on Go 1.21.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com>
2025-10-14 09:19:55 +00:00
xgopilot
3ce198f103 fix: remove llgo:skipall directive from maphash overlay
The llgo:skipall directive was preventing fallback to the standard library,
causing undefined symbol errors for functions like WriteString, MakeSeed, etc.
The overlay now only defines the two linkname functions, allowing typepatch
to handle the rest.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com>
2025-10-14 08:29:26 +00:00
xgopilot
e05c91530e refactor: move hash/maphash linkname bindings to maphash package
Move runtime_rand and runtime_memhash linkname declarations from
runtime/internal/lib/runtime/runtime.go to runtime/internal/lib/hash/maphash/maphash.go
to avoid polluting the runtime package namespace.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com>
2025-10-14 08:01:10 +00:00
xgopilot
cf6cc937ef fix: add runtime.rand and runtime.memhash for hash/maphash support
- Register hash/maphash in hasAltPkg map in runtime/build.go
- Add rand() function that bridges to fastrand64() in runtime overlay
- Add memhash() function that bridges to internal memhash() in runtime overlay
- Fixes issue where hash/maphash package failed with undefined symbols

Fixes #1338

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <luoliwoshang@users.noreply.github.com>
Co-authored-by: xgopilot <noreply@goplus.org>
2025-10-14 07:04:42 +00:00
xushiwei
0c63138ccd Merge pull request #1328 from visualfc/reflect
runtime/internal/lib/reflect: fix Field closure kind to func
2025-09-26 16:25:08 +08:00
visualfc
ccaf59ec62 runtime/internal/lib/reflect: fix Field closure kind to func 2025-09-26 10:27:56 +08:00
visualfc
62d0ee39de runtime: math/big use math_big_pure_go 2025-09-24 10:32:57 +08:00
Haolan
c50395b2b9 test: add esp32 libc and rt test 2025-09-10 17:03:05 +08:00
Haolan
0bbdb6c204 fix: change clite's LLGoPackage to true to execute its init() 2025-09-10 14:14:22 +08:00
Haolan
d9a20e8000 fix: stdio and typo 2025-09-08 14:13:25 +08:00
Haolan
7ca8abc788 fix: println 2025-09-05 19:00:53 +08:00
Haolan
e444c4b6ac fix: typo 2025-09-05 16:55:38 +08:00
Haolan
0d02a7273e fix: rethrow in baremental 2025-09-05 16:41:58 +08:00
Haolan
0c418073b3 revert unix 2025-09-05 16:29:58 +08:00
Haolan
2d1120bf69 fix: symbol not found when building in baremental environment 2025-09-05 16:27:38 +08:00
visualfc
69fe6d6377 runtime/internal/lib/os: fix readdir for darwin-amd64 2025-08-26 22:23:30 +08:00
visualfc
56733e1dbd runtime/internal/lib/internal/cpu: use __cpuid_count 2025-08-20 17:09:02 +08:00
xushiwei
1f94cfbe57 Merge pull request #1173 from luoliwoshang/os/direntNamePtr
os:direntNamePtr for array
2025-08-07 16:59:56 +08:00
visualfc
e77c3a040d runtime: support syscall/js 2025-07-07 10:31:22 +08:00
visualfc
281b3ecf64 runtime/js: itoa 2025-07-04 10:00:46 +08:00
visualfc
08077f03f1 runtime/js: impl CopyBytesToGo,CopyBytesToJS 2025-07-02 20:00:08 +08:00
visualfc
3d41514abd runtime/js: fix call args value incref 2025-07-02 14:36:08 +08:00
xushiwei
8983b146f2 Merge pull request #1180 from visualfc/emcc_js
[WIP] runtime/js: js for emscripten
2025-07-01 13:24:04 +08:00
visualfc
013f2ef00d debug: fix print stack for wasm 2025-07-01 11:31:15 +08:00
visualfc
e972be8dab runtime/js: js for emscripten 2025-06-30 20:55:32 +08:00
luoliwoshang
417a5692e3 os:direntNamePtr for array 2025-06-26 11:44:40 +08:00
visualfc
4726e824a0 build: link globals importpath.name=value 2025-06-17 11:11:06 +08:00
visualfc
20a7d0f120 runtime/internal/lib/reflect: fix funcOf for runtime 2025-06-12 16:12:34 +08:00
visualfc
84729e21b8 reflect: makeFunc 2025-06-12 15:50:56 +08:00
xushiwei
26aaa65c1d Merge pull request #1144 from visualfc/ffi_wasm
libffi: support wasm32
2025-06-12 12:55:35 +08:00
luoliwoshang
93197e7621 internal/build:compile with c mode,when c file 2025-06-12 11:55:47 +08:00
luoliwoshang
e7e9530eb8 some wrap to cpp 2025-06-11 21:02:32 +08:00
luoliwoshang
4f5c95045d chore:keep origin c format 2025-06-11 20:30:44 +08:00
luoliwoshang
efabdf27c8 fcntl_unix.cpp 2025-06-11 20:04:13 +08:00
luoliwoshang
f36098d704 internal:link by LLGoFile to find libunwind 2025-06-11 19:46:49 +08:00
luoliwoshang
0cb29ab388 internal/runtime:runtime.cpp 2025-06-11 19:02:58 +08:00
luoliwoshang
c2a50fa98d internal/clite:wrap with cpp 2025-06-11 18:18:52 +08:00
luoliwoshang
f2f93c7f5f cl:compile with clang++ 2025-06-11 17:01:12 +08:00
visualfc
ce984d44a0 libffi: support wasm32 2025-06-11 09:10:46 +08:00
xushiwei
fc86634e29 Merge pull request #1140 from luoliwoshang/internal/dir
runtime:forkAndExecInChild chdir
2025-06-06 09:12:05 +08:00
luoliwoshang
701568e011 internal:forkAndExecInChild chdir 2025-06-05 18:54:25 +08:00
visualfc
dade77d719 syscall: Stat_t for js/wasip1 2025-06-05 14:53:28 +08:00
Haolan
69b2bfdeb2 fix: uninitiated mutex 2025-05-26 17:21:19 +08:00
visualfc
bb70b6eeab runtime: GOOS GOARCH Compiler 2025-05-17 16:28:26 +08:00
Li Jie
bb43622fe7 runtime: wasm compatible with js build tag 2025-05-17 10:48:26 +08:00
xushiwei
9203c366e7 Merge pull request #1121 from visualfc/closure
fix reflect.pointer  for closure; fix runtime unsafe.pointer ptrBytes
2025-05-17 01:19:40 +08:00