xgopilot
05da9ec252
fix: preserve Named interface type information through interface construction
...
This commit addresses the root cause identified in issue #1370 by preserving
Named interface type information through the interface construction phase.
**Root Cause:**
Named interfaces were prematurely unwrapped via Underlying() in the interface
construction phase (MakeInterface()/unsafeInterface()), causing the subsequent
ABI type generation to hit `case *types.Interface:` instead of
`case *types.Named:`, resulting in loss of package information.
**The Fix:**
1. Modified `unsafeInterface()` to accept a `namedIntf types.Type` parameter
2. Updated all callers to pass the Named type (tinter.raw.Type, assertedTyp.raw.Type, etc.)
3. When namedIntf is available, pass it to `abiType()` to ensure proper routing
through the type switch to `abiNamedInterfaceOf()` which has correct package context
4. Reverted the workaround logic in `abiInterfaceOf()` that extracted pkgPath from methods
**Impact:**
- Fixes segmentation faults when calling interface private methods across packages
- Ensures runtime receives correct package path for interface metadata
- Allows private method slots in itab to be properly filled
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-10-28 10:32:20 +00:00
visualfc
56f90dbcf9
ssa: fix TypeAssert check null
2025-08-08 12:11:17 +08:00
Li Jie
ed366568b4
move out c/cpp/py
2025-04-03 16:26:11 +08:00
Li Jie
1172e5bdce
build: separate compiler and libs
2025-01-08 14:59:01 +08:00
visualfc
3741a28d94
ssa: fix bitcast for float32
2024-12-24 10:02:30 +08:00
visualfc
a6a3c09c05
ssa: closure use specific struct field name { $f ftype, $data unsafe.pointer }
2024-12-22 12:44:33 +08:00
visualfc
6b0122547e
reflect.call: internal/abi: TFlagClosure, internal/lib/reflect: flagClosure.
2024-11-01 15:27:40 +08:00
visualfc
2174d8fe8c
ssa: makeInterface check funcdecl => closure
2024-08-15 10:12:18 +08:00
visualfc
28d8c56534
ssa: index take addr
2024-07-04 18:50:36 +08:00
visualfc
16352df5b1
ssa: fix abiType && abiMethoOf
2024-06-25 10:22:32 +08:00
visualfc
3f0c65ebb2
ssa: fix typeAssert for Nil
2024-06-11 20:50:01 +08:00
visualfc
2fce2318ed
ssa: set method.name to pkg.name if private
2024-06-06 07:30:59 +08:00
visualfc
193e6dfc93
ssa: ChangeInterface
2024-06-03 16:03:05 +08:00
visualfc
7596658e6c
ssa: MakeInterface check abi.KindDirectIface
2024-06-03 11:47:16 +08:00
xushiwei
76c1800a53
abiTypes: abiTypeInit fix
2024-05-31 08:12:27 +08:00
xushiwei
3b2f01e974
abiTypes
2024-05-31 07:35:22 +08:00
xushiwei
e5f38a6fc1
abitype.go
2024-05-28 23:58:37 +08:00
xushiwei
8c105d87c1
runtime: newNamed; llgo/ssa: abiMethodOf
2024-05-28 23:45:32 +08:00
xushiwei
1c1da6433a
runtime: rm NewSlice (use b.unsafeSlice); llgo/ssa: Println
2024-05-28 07:47:07 +08:00
visualfc
3328847e27
ssa: sliceOf arrayOf
2024-05-27 14:54:24 +08:00
xushiwei
8e89dc8aa9
llgo/ssa: abiMethodOf; AfterInit bugfix
2024-05-27 14:32:23 +08:00
xushiwei
df13e3ab82
PrintIface
2024-05-27 09:56:42 +08:00
xushiwei
8536fe4987
llgo/ssa: Imethod
2024-05-27 09:46:07 +08:00
xushiwei
165a99fd83
llgo/ssa: unsafeInterface; runtime.PointerTo
2024-05-27 08:07:34 +08:00
xushiwei
eae94c5f23
remove abi.Name
2024-05-26 17:53:29 +08:00
xushiwei
ddabfdca3d
SetBlockEx: BeforeLast
2024-05-26 16:18:24 +08:00
xushiwei
91c9b4e168
llgo/ssa: pkgName
2024-05-26 09:34:43 +08:00
xushiwei
914a0c60b0
runtime: iface
2024-05-26 08:59:10 +08:00
xushiwei
5eac8d860a
abiType fix
2024-05-25 08:20:09 +08:00
xushiwei
1226308f3d
TypeAssert bugfix; testcase struczero
2024-05-25 07:43:24 +08:00
xushiwei
40dd25c122
abi: support named
2024-05-25 01:11:35 +08:00
xushiwei
ab7c828cfa
InterfaceData
2024-05-24 23:06:54 +08:00
xushiwei
3cc975813d
abiType: support pointer
2024-05-24 22:47:45 +08:00
xushiwei
77eeea95c7
valFromData BitCast bugfix
2024-05-24 09:30:16 +08:00
xushiwei
056ad51c24
llgo/ssa.Phi: AddIncoming fix
2024-05-24 09:20:58 +08:00
xushiwei
88004cac76
abiBasic fix
2024-05-24 07:51:41 +08:00
xushiwei
1162a5f916
AfterInit: init
2024-05-24 03:22:10 +08:00
xushiwei
418c37dd52
AfterInit bugfix: add param Builder
2024-05-24 02:42:10 +08:00
xushiwei
b66827998d
llgo/ssa: AfterInit
2024-05-24 02:09:57 +08:00
xushiwei
b195656900
llgo/ssa: MakeInterface
2024-05-24 01:45:41 +08:00
xushiwei
2628ee98f3
llgo/ssa: valFromData, buildVal
2024-05-24 01:18:18 +08:00
xushiwei
176c0b2d36
abi.KindOf; llgo/ssa: valFromData
2024-05-24 00:36:51 +08:00
xushiwei
4986592dd7
TypeAssert refactor
2024-05-23 01:34:48 +08:00
xushiwei
a4c4324ba3
merge Field/Extract; prog.Tuple/Zero; TypeAssert refactor
2024-05-23 01:10:13 +08:00
xushiwei
6442ab2f20
llgo/ssa: unsafeEface
2024-05-22 13:47:21 +08:00
xushiwei
c19786bdfb
llgo/ssa: AfterInit/SliceLit/InterfaceData, unsafe.Slice; ssa/abi: Basic/Struct
2024-05-22 10:07:21 +08:00
xushiwei
e61ebb4eb9
abi.Name; runtime: MakeAnyInt => MakeAnyIntptr; llgo/ssa: AllocU; builtin unsafe.String; MakeInterface; prog.PointerSize
2024-05-20 08:46:39 +08:00
xushiwei
55365b1d17
update llvm
2024-05-19 16:42:22 +08:00
xushiwei
39268c681f
llgo/ssa: Builder add Pkg
2024-05-19 13:00:58 +08:00
xushiwei
3bf3a276de
MakeInterface: todo
2024-05-19 12:31:59 +08:00