Merge commit 'd06146ed970f52d564521ff0be7d56839c85e497' into async-functions
* commit 'd06146ed970f52d564521ff0be7d56839c85e497': (152 commits)
perf(lib/sync): avoid using `defer`
refactor(c-libuv): Added TODO(uid) comment & adjusted the position of Handle, Stream, Req, Write, Connect
README: io/ioutil
library: io/ioutil
c/openssl: bio, pem, rsa
refactor(c/libuv): Adapt libuv.Fs struct
Revert "fix(c/libuv): Add libuv fs struct new func"
fix(c/libuv): Fix async_fs demo return 255 error & pointer not allocated error
fix(c/libuv): Add libuv fs struct new func
doc/c:refine symbol visibility description
README: math/big
library: math/big.Int (mini-impl for _cmptest/bigintdemo)
doc/c:update implicit destructors description
c/openssl: bignum, rsa
library: crypto
library: crypto/{sha1, sha256, sha512}
doc/c:fix incorrect usage in construtors
doc/c:update destructor usage
delete sum
fix test error
...
# Conflicts:
# ssa/eh.go
This commit is contained in:
71
cl/import.go
71
cl/import.go
@@ -509,41 +509,6 @@ func (p *context) ensureLoaded(pkgTypes *types.Package) *types.Package {
|
||||
return pkgTypes
|
||||
}
|
||||
|
||||
func pkgKindByPath(pkgPath string) int {
|
||||
switch pkgPath {
|
||||
case "runtime/cgo", "unsafe":
|
||||
return PkgDeclOnly
|
||||
}
|
||||
return PkgNormal
|
||||
}
|
||||
|
||||
func replaceGoName(v string, pos int) string {
|
||||
switch v[:pos] {
|
||||
case "runtime":
|
||||
return "github.com/goplus/llgo/internal/runtime" + v[pos:]
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
func ignoreName(name string) bool {
|
||||
/* TODO(xsw): confirm this is not needed more
|
||||
if name == "unsafe.init" {
|
||||
return true
|
||||
}
|
||||
*/
|
||||
const internal = "internal/"
|
||||
return (strings.HasPrefix(name, internal) && !supportedInternal(name[len(internal):])) ||
|
||||
strings.HasPrefix(name, "crypto/") || strings.HasPrefix(name, "runtime/") ||
|
||||
strings.HasPrefix(name, "arena.") || strings.HasPrefix(name, "maps.") ||
|
||||
strings.HasPrefix(name, "plugin.")
|
||||
}
|
||||
|
||||
func supportedInternal(name string) bool {
|
||||
return strings.HasPrefix(name, "abi.") || strings.HasPrefix(name, "bytealg.") ||
|
||||
strings.HasPrefix(name, "oserror.") || strings.HasPrefix(name, "reflectlite.") ||
|
||||
strings.HasPrefix(name, "syscall/unix.") || strings.HasPrefix(name, "syscall/execenv.")
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
const (
|
||||
@@ -609,3 +574,39 @@ func toBackground(bg string) llssa.Background {
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
func pkgKindByPath(pkgPath string) int {
|
||||
switch pkgPath {
|
||||
case "runtime/cgo", "unsafe":
|
||||
return PkgDeclOnly
|
||||
}
|
||||
return PkgNormal
|
||||
}
|
||||
|
||||
func replaceGoName(v string, pos int) string {
|
||||
switch v[:pos] {
|
||||
case "runtime":
|
||||
return "github.com/goplus/llgo/internal/runtime" + v[pos:]
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
func ignoreName(name string) bool {
|
||||
/* TODO(xsw): confirm this is not needed more
|
||||
if name == "unsafe.init" {
|
||||
return true
|
||||
}
|
||||
*/
|
||||
const internal = "internal/"
|
||||
return (strings.HasPrefix(name, internal) && !supportedInternal(name[len(internal):])) ||
|
||||
strings.HasPrefix(name, "runtime/") || strings.HasPrefix(name, "arena.") ||
|
||||
strings.HasPrefix(name, "maps.") || strings.HasPrefix(name, "plugin.")
|
||||
}
|
||||
|
||||
func supportedInternal(name string) bool {
|
||||
return strings.HasPrefix(name, "abi.") || strings.HasPrefix(name, "bytealg.") ||
|
||||
strings.HasPrefix(name, "itoa.") || strings.HasPrefix(name, "oserror.") || strings.HasPrefix(name, "reflectlite.") ||
|
||||
strings.HasPrefix(name, "syscall/unix.") || strings.HasPrefix(name, "syscall/execenv.")
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user